We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4d4067 commit 033549cCopy full SHA for 033549c
code-input.js
@@ -831,8 +831,12 @@ var codeInput = {
831
if (this.templateObject != undefined) {
832
// Template registered before loading
833
this.classList.add("code-input_registered");
834
- // Children not yet present - wait until they are
835
- window.addEventListener("DOMContentLoaded", this.setup.bind(this))
+ if (document.readyState === 'loading') {
+ // Children not yet present - wait until they are
836
+ window.addEventListener("DOMContentLoaded", this.setup.bind(this))
837
+ } else {
838
+ this.setup();
839
+ }
840
}
841
842
0 commit comments