jquery/test/unit
Michał Gołębiowski-Owczarek df6a7f7f0f
Selector: Leverage the :scope pseudo-class where possible
The `:scope` pseudo-class[1] has surprisingly good browser support: Chrome,
Firefox & Safari have supported if for a long time; only IE & Edge lack support.
This commit leverages this pseudo-class to get rid of the ID hack in most cases.
Adding a temporary ID may cause layout thrashing which was reported a few times
in [the past.

We can't completely eliminate the ID hack in modern browses as sibling selectors
require us to change context to the parent and then `:scope` stops applying to
what we'd like. But it'd still improve performance in the vast majority of
cases.

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/:scope

Fixes gh-4453
Closes gh-4454
Ref gh-4332
Ref jquery/sizzle#405
2019-08-19 18:41:03 +02:00
..
ajax.js Core: Remove IE-specific support tests, rely on document.documentMode 2019-05-13 21:39:56 +02:00
animation.js Build: Update Sinon from 2.3.7 to 7.3.1, other updates 2019-04-04 16:53:38 +02:00
attributes.js Selector: Inline Sizzle into the selector module 2019-07-29 21:19:21 +02:00
basic.js Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJS 2019-04-29 22:56:09 +02:00
callbacks.js Build: Update test code for compatibility with QUnit 2.x (#4297) 2019-02-18 19:03:26 +01:00
core.js Selector: Inline Sizzle into the selector module 2019-07-29 21:19:21 +02:00
css.js Selector: Inline Sizzle into the selector module 2019-07-29 21:19:21 +02:00
data.js Core: Remove IE-specific support tests, rely on document.documentMode 2019-05-13 21:39:56 +02:00
deferred.js Core: Remove IE-specific support tests, rely on document.documentMode 2019-05-13 21:39:56 +02:00
deprecated.js Core: Remove IE-specific support tests, rely on document.documentMode 2019-05-13 21:39:56 +02:00
dimensions.js Core: Remove IE-specific support tests, rely on document.documentMode 2019-05-13 21:39:56 +02:00
effects.js Selector: Inline Sizzle into the selector module 2019-07-29 21:19:21 +02:00
event.js Selector: Inline Sizzle into the selector module 2019-07-29 21:19:21 +02:00
exports.js Build: Update test code for compatibility with QUnit 2.x (#4297) 2019-02-18 19:03:26 +01:00
manipulation.js Selector: Inline Sizzle into the selector module 2019-07-29 21:19:21 +02:00
offset.js Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJS 2019-04-29 22:56:09 +02:00
queue.js Core: Remove IE-specific support tests, rely on document.documentMode 2019-05-13 21:39:56 +02:00
ready.js Tests: move readywait to an iframe test 2017-03-20 11:37:15 -04:00
selector.js Selector: Leverage the :scope pseudo-class where possible 2019-08-19 18:41:03 +02:00
serialize.js Build: Update test code for compatibility with QUnit 2.x (#4297) 2019-02-18 19:03:26 +01:00
support.js Selector: Leverage the :scope pseudo-class where possible 2019-08-19 18:41:03 +02:00
traversing.js Selector: Inline Sizzle into the selector module 2019-07-29 21:19:21 +02:00
tween.js Build: Update Sinon from 2.3.7 to 7.3.1, other updates 2019-04-04 16:53:38 +02:00
wrap.js Build: Update test code for compatibility with QUnit 2.x (#4297) 2019-02-18 19:03:26 +01:00