Commit 6c38482
committed
defer external script parsing until after DOMContentLoaded
Fixes #533. External behavior files loaded via
<script type="text/hyperscript" src="..."> were being parsed before
plugins like hdb.js could register their commands, causing
"Unexpected Token: breakpoint" errors.
The fix separates fetch from parse: external files are still fetched
immediately for performance, but parsing is deferred until after
ready() fires, giving synchronous plugin scripts time to register.
Signed-off-by: André Ahlert <andre@aex.partners>1 parent 1f751bd commit 6c38482
3 files changed
Lines changed: 66 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7628 | 7628 | | |
7629 | 7629 | | |
7630 | 7630 | | |
7631 | | - | |
| 7631 | + | |
| 7632 | + | |
| 7633 | + | |
| 7634 | + | |
| 7635 | + | |
| 7636 | + | |
| 7637 | + | |
7632 | 7638 | | |
7633 | 7639 | | |
7634 | 7640 | | |
7635 | 7641 | | |
7636 | 7642 | | |
7637 | 7643 | | |
7638 | | - | |
7639 | | - | |
7640 | | - | |
7641 | | - | |
7642 | | - | |
| 7644 | + | |
7643 | 7645 | | |
7644 | | - | |
| 7646 | + | |
| 7647 | + | |
7645 | 7648 | | |
| 7649 | + | |
| 7650 | + | |
7646 | 7651 | | |
7647 | 7652 | | |
7648 | 7653 | | |
7649 | | - | |
| 7654 | + | |
| 7655 | + | |
| 7656 | + | |
| 7657 | + | |
| 7658 | + | |
| 7659 | + | |
| 7660 | + | |
| 7661 | + | |
| 7662 | + | |
7650 | 7663 | | |
7651 | 7664 | | |
7652 | 7665 | | |
7653 | 7666 | | |
7654 | 7667 | | |
7655 | | - | |
| 7668 | + | |
7656 | 7669 | | |
7657 | 7670 | | |
7658 | 7671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
0 commit comments