We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8d3d3e4 + 1226279 commit b01086eCopy full SHA for b01086e
1 file changed
βsrc/_hyperscript.jsβ
@@ -180,11 +180,14 @@ if (typeof document !== 'undefined') {
180
})
181
);
182
183
- // Evaluate loaded scripts
184
- scriptTexts.forEach(sc => _hyperscript(sc));
185
-
186
- // Wait for DOM ready, then initialize
+ // Wait for DOM ready, then parse external scripts and initialize.
+ // Parsing is deferred until after ready() so plugins loaded via
+ // synchronous <script> tags (e.g. hdb.js) have registered their
+ // commands before behavior files are evaluated.
187
+ // See https://github.com/bigskysoftware/_hyperscript/issues/533
188
ready(() => {
189
+ scriptTexts.forEach(sc => _hyperscript(sc));
190
+
191
_hyperscript.process(document.documentElement);
192
document.dispatchEvent(new Event("hyperscript:ready"));
193
0 commit comments