Commit 0f5cf8a
[Sage 10] Replace jQuery’s .ready() (#2182)
* Use DOMContentLoaded listener for document ready
* Account for DOMContentLoaded not firing
* Extract ready() to utils.js
Also uses `window.setTimeout(fn, 0)` to cover async.
In a commit/PR in the near future, the `util` directory will be going
away since the DOM router has been extracted to its own package
(https://github.com/roots/js-dom-router). `utils.js` will function as a
place for custom utilities, similar to what `app/helpers.php` is on the
PHP side of things.1 parent 04102fa commit 0f5cf8a
2 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments