File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,17 @@ export default function linkFiber(mode: Status): () => Promise<void> {
133133 // Obtain the updated FiberRootNode, after the target React application re-renders
134134 const fiberRoot = args [ 1 ] ;
135135 // If the target React application is visible, send a request to update the snapShot tree displayed on Chrome Extension
136- if ( isVisible ) throttledUpdateSnapshot ( fiberRoot , mode ) ;
136+ if ( isVisible ) {
137+ throttledUpdateSnapshot ( fiberRoot , mode ) ;
138+ // SEND COMMAND TO FRONT END TO GET NEW AX TREE
139+ window . postMessage (
140+ {
141+ action : 'recordAXSnap' ,
142+ payload : 'recordAXSnap' ,
143+ } ,
144+ '*' ,
145+ ) ;
146+ }
137147 // After our added work is completed we invoke the original onComitFiberRoot function
138148 return onCommitFiberRoot ( ...args ) ;
139149 } ;
Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ window.addEventListener('message', (msg) => {
3636 if ( action === 'aReactApp' ) {
3737 chrome . runtime . sendMessage ( msg . data ) ;
3838 }
39+ if ( action === 'recordAXSnap' ) {
40+ // chrome.runtime.sendMessage()
41+ }
3942} ) ;
4043
4144// FROM BACKGROUND TO CONTENT SCRIPT
You can’t perform that action at this time.
0 commit comments