Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Turns out we have the same issues as domready: async/sync invocation of domready handlers is inconsistent (a clear example in this comment).
With this we have essentially a version of domready for IE11+ and single callback support.
Comment | File | Size | Author |
---|---|---|---|
#4 | core-domready-async-3152473-4.patch | 917 bytes | nod_ |
#2 | core-domready-async-3152473-2.patch | 935 bytes | nod_ |
Comments
Comment #2
nod_Comment #3
lauriiiThis needs a reroll now that #3096516: domready has a race condition has been committed.
Comment #4
nod_reroll
Comment #5
zrpnrThe reasoning in the linked issue makes sense, the fallback for when document.readyState is not "loading" should also be asynchronous.
This matches the fix in https://github.com/ded/domready/commit/d71121bf7072586d828761790a4d9ad7e...
The re-roll in #4 applies to 9.1.x.
Manually tested that this function works on Mac and in IE11 on Windows8.1
Nice catch! The article linked in the domready issue was an interesting read as well.
Comment #7
lauriii+1 to the change. It's definitely better API design to consistently call the callback asynchronously.
Committed fc8ca40 and pushed to 9.1.x. Thanks!