Hi! I'm trying to understand when does the chrome.offscreen.createDocument() promise resolve, precisely?
For example: if our offscreen document has a script of type=module, does the promise resolve earlier than the script has been executed?
Similarly, if we append an iframe inside the offscreen document, and the iframe has its own scripts with type=module, then does the createDocument() promise resolve earlier than the iframe is loaded/its script has been executed?
A precise answer is important, because we send a message to the offscreen document as soon as the createDocument promise is resolved. If its script has not been parsed when we do that, our message would be lost, because the offscreen document wouldn't have setup the listeners.
Best,
Gaurang