-
-
Save mrcnkoba/596b4fa05508ebe81229367f6f6433c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
popup.createHtmlPanel({ | |
url: YOUR_URL | |
height: 75 | |
}) | |
.then(function (htmlPanel) { | |
const onload = (reason) => { | |
console.log(htmlPanel.window.document.getElementById("register-form")); | |
}; | |
// if it is still loading please add event listener to DOMContentLoaded | |
if(htmlPanel.window.readystate === "loading") { | |
htmlPanel.window.document.addEventListener("DOMContentLoaded", () => onload("domcontentloaded") , true) | |
} | |
// It's past the DOMContentLoaded, the DOMContentLoaded won't be fired again. please just call the callback | |
else{ | |
onload("already done"); | |
} | |
}) | |
.catch(function (error) { | |
console.log(error); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment