Once the dependency patch is in, it'll be a huge win to reduce jQuery dependency on some scripts.
Meaning putting the freezeHeight in ajax.js where it's used.
The tricky part is the content ready call. we'll either have to move or replace it. I can see a separate file with only this call and a dependency on jQuery for the small file. It'll be easy for someone to just swap it out and use something else if possible.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | core-js-remove-jQuery-drupaljs-1751584-9.patch | 5.41 KB | seutje |
| #9 | core-js-remove-jQuery-drupaljs-1751584-9-interdiff.txt | 769 bytes | seutje |
| #3 | core-js-remove-jQuery-drupaljs-1751584-3.patch | 4.66 KB | nod_ |
Comments
Comment #1
nod_Comment #2
nod_Patch is in, making this happen could be a huge win now.
Comment #3
nod_Moving freezeheight and adding a ~450b of minified+gziped JS to handle domready using this: https://github.com/ded/domready
This patch removes the noConflict mode of jQuery since I don't know where that should be now that we don't depend on it for drupal.js This is NW but putting as NR to get some opinions.
Comment #4
nod_tag
Comment #6
nod_Compared a few runs, this patch benefits more significantly IE9 than Firefox, that's interesting. Anyway, data backs-up that this is a perf improvment even if jQuery is still needed in other parts of the admin.
Comment #7
nod_Let's deal with the error later, just want opinions on the thing for now.
Comment #8
jelle_sPatch looks pretty sane to me. Not sure what causes the error though?
Comment #9
seutje commentedThe test that failed assumes that any call to
drupal_add_jsthat adds inline JavaScript, also adds jQuery.Modified the test to also add jQuery.
Not sure if this is the proper approach, but it makes sense to me that inline JavaScript would need to define its dependency on jQuery, without turning the inline JavaScript into a "library" with a dependency.
Comment #10
nod_Hahaha awsome. I duplicated my own issue. #1974580: Introduce domReady to remove jQuery dependency from drupal.js and clean it up.