Skip to content

Commit dfdc809

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 905503c + b01086e commit dfdc809

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

‎src/_hyperscript.js‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff 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

‎src/ext/hdb.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

‎www/index.njk‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 &#x2764;&#xFE0F; events!</p>
141141
{% highlight "html" %}
142142
<button _="on click send hello to <form/>">

0 commit comments

Comments
 (0)