jquery/test
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
..
data Tests: Fix a comment in testinit.js 2019-08-19 18:36:21 +02:00
integration Event: Fix delegated radio events when arrow keys are used 2015-10-18 13:06:37 -04:00
node_smoke_tests Build: Update jsdom; migrate a test with Symbol polyfill to an iframe test 2019-03-04 18:30:51 +01:00
promises_aplus_adapters Build: Update jsdom; migrate a test with Symbol polyfill to an iframe test 2019-03-04 18:30:51 +01:00
unit Selector: Leverage the :scope pseudo-class where possible 2019-08-19 18:41:03 +02:00
.eslintrc.json Selector: Port Sizzle tests to jQuery 2019-06-26 21:39:10 +02:00
delegatetest.html Tests: Change quotes according to style guidelines 2015-10-18 13:17:23 -04:00
hovertest.html Ref #13316: Sync all documents on full vs. minified source. Close gh-1147. 2013-02-07 15:16:28 -05:00
index.html Build: Update QUnit from 1.23.1 to 2.9.2 2019-03-04 20:10:21 +01:00
jquery.js Core: Preserve CSP nonce on scripts in DOM manipulation 2019-01-14 19:29:54 +01:00
karma.context.html Tests: Add support for running unit tests via grunt with karma 2017-12-18 12:27:38 -05:00
karma.debug.html Tests: Add support for running unit tests via grunt with karma 2017-12-18 12:27:38 -05:00
localfile.html Ref #13316: Sync all documents on full vs. minified source. Close gh-1147. 2013-02-07 15:16:28 -05:00
middleware-mockserver.js Core: Remove IE-specific support tests, rely on document.documentMode 2019-05-13 21:39:56 +02:00
networkerror.html Docs: Updated links to https where they are supported. 2016-01-13 13:26:10 -05:00
xhtml.php Added a way to run the test suite as an XHTML page. 2009-01-19 18:14:51 +00:00