Commit 0fa9480
authored
fix: load JS synchronously in fragment to prevent race conditions
Previously, when loading JS for virtualdom and drag_and_drop (which depends on
virtualdom) from cache, there was a risk that drag_and_drop could load before
virtualdom. This would cause virtualdom to be undefined, resulting in the
XBlock failing to load.
With these changes, the JavaScript code is now inlined in the HTML fragment.
This guarantees the correct loading order and prevents such race conditions.1 parent 6e0e6ac commit 0fa9480
3 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
| 351 | + | |
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| |||
0 commit comments