Replies: 1 comment
-
#1763 will make injectScript wait until the script has been loaded, and #1765, once its design is finalized, will also wait until the main function of the script returns (which can be different if it's asynchronous). #1762 will also allow you to send strings to the script in the form of data attributes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My requirement is to pass 1 object to it immediately after the injectScript script injection is completed. I tried sending a message in the callback of the then after the injectScript is executed, but the script injected by injectScript did not receive the message. When I used console.log for debugging output, I found that when the injectScript reaches the callback of the then, the outermost output of the script injected by injectScript is not printed. My current approach is to send a message called onLoad to the script injected by injectScript first, and then send the message to pass the object into the script injected by injectScript after the content script receives the message. I am not sure if what I am doing is correct, and whether there is a better way?
Beta Was this translation helpful? Give feedback.
All reactions