File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,11 +180,14 @@ if (typeof document !== 'undefined') {
180180 } )
181181 ) ;
182182
183- // Evaluate loaded scripts
184- scriptTexts . forEach ( sc => _hyperscript ( sc ) ) ;
185-
186- // Wait for DOM ready, then initialize
183+ // Wait for DOM ready, then parse external scripts and initialize.
184+ // Parsing is deferred until after ready() so plugins loaded via
185+ // synchronous <script> tags (e.g. hdb.js) have registered their
186+ // commands before behavior files are evaluated.
187+ // See https://github.com/bigskysoftware/_hyperscript/issues/533
187188 ready ( ( ) => {
189+ scriptTexts . forEach ( sc => _hyperscript ( sc ) ) ;
190+
188191 _hyperscript . process ( document . documentElement ) ;
189192 document . dispatchEvent ( new Event ( "hyperscript:ready" ) ) ;
190193
Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ var ui = `
335335 decrement @data-hist
336336 else if event.key is 'ArrowDown' and @data-hist < 0
337337 increment @data-hist
338- end end
338+ end
339339 set #console-input.value to hdb.consoleHistory[hdb.consoleHistory.length + @data-hist as Int]
340340 or oldContent
341341 halt default
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ title: ///_hyperscript
136136<div class =" feature" >
137137 <h2 >Event Oriented</h2 >
138138 <p >In hyperscript, events are first class citizens. Respond to events easily. Send events between elements,
139- filter them with conditions, queue abd debounce them.</p >
139+ filter them with conditions, queue and debounce them.</p >
140140 <p >Hyperscript ❤ ;️ ; events!</p >
141141{% highlight " html" %}
142142<button _ =" on click send hello to <form/>" >
You can’t perform that action at this time.
0 commit comments