Missing jQuery.once dependencies on some JS files.
Do not register all JS files. for example when we load core/drupal.form, it will also loaded the dependencies (core/jquery & core/drupal) automatically.
Thinking that I will spend some time this week to review all JS dependencies :)
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | jquery_once_dependencies-12.patch | 3.52 KB | droplet |
Comments
Comment #1
nod_I disagree. Don't remove dependencies like this please.
What happens if I override jquery.once from contrib to remove it's jQuery dependency? everything breaks. If it's explicitly used in the JS file, it needs to be explicitly declared in the dependencies. If I'm using jQuery it needs to be a dependency. Knowing the exact level in which a dependency is needed is required to sort the dependency graph properly.
The name of the library does not suppose there is a hard dependency on anything. Dependencies are declarative, not implied.
Comment #2
droplet commentedhmm.. Sounds right.
Comment #3
nod_Thanks. All good :)
Comment #4
droplet commented@nod_,
do you mind to review all changes in one Patch ?? I made it already, just 11 changes. Saving thousand years to create 11 issue threads. :)
Comment #5
nod_Yeah, totally, go for it.
Comment #6
droplet commentedComment #7
nod_Manually confirmed for each file the need for jquery.once dependency. All good.
Thanks.
Comment #9
droplet commented6: jquery_once_dependencies.patch queued for re-testing.
Comment #10
droplet commentedback to RTBC #7. testbots self errors only.
Comment #11
webchickSorry, this one needs a re-roll.
Comment #12
droplet commentedGit rebased. ( no difference)
Comment #13
nod_thx
Comment #14
webchickCommitted and pushed to 8.x. Thanks!