1111 rel =dcterms.rights >
1212 < meta content ="Selectors Level 4 " name =dcterms.title >
1313 < meta content =text name =dcterms.type >
14- < meta content =2014-03-20 name =dcterms.date >
14+ < meta content =2014-03-22 name =dcterms.date >
1515 < meta content ="Elika J. Etemad " name =dcterms.creator >
1616 < meta content ="Tab Atkins Jr. " name =dcterms.creator >
1717 < meta content =W3C name =dcterms.publisher >
3232
3333 < h1 id =title > Selectors Level 4</ h1 >
3434
35- < h2 class ="no-num no-toc "> Editor's Draft 20 March 2014</ h2 >
35+ < h2 class ="no-num no-toc "> Editor's Draft 22 March 2014</ h2 >
3636
3737 < dl >
3838 < dt > This version:
3939
4040 < dd > < a href ="http://dev.w3.org/csswg/selectors4/ ">
41- http://www.w3.org/TR/2014/ED-selectors4-20140320 /</ a >
41+ http://www.w3.org/TR/2014/ED-selectors4-20140322 /</ a >
4242
4343 < dt > Editor's draft:
4444
@@ -549,16 +549,14 @@ <h2 id=context><span class=secno>1. </span> Introduction</h2>
549549
550550 < ul >
551551 < li > directly on an element to test whether it matches some criteria, such
552- as in the < code > Element.matches()</ code > function defined in < a
553- href ="#ref-SELECTORS-API2 "
554- rel =biblioentry > [SELECTORS-API2]<!--{{SELECTORS-API2}}--> </ a >
552+ as in the < code > element.matches()</ code > function defined in < a
553+ href ="#ref-DOM " rel =biblioentry > [DOM]<!--{{DOM}}--> </ a >
555554
556555 < li > applied to an entire tree of elements to filter it into a set of
557556 elements that match the criteria, such as in the
558- < code > document.findAll()</ code > function defined in < a
559- href ="#ref-SELECTORS-API2 "
560- rel =biblioentry > [SELECTORS-API2]<!--{{SELECTORS-API2}}--> </ a > or the
561- selector of a CSS style rule.
557+ < code > document.queryAll()</ code > function defined in < a href ="#ref-DOM "
558+ rel =biblioentry > [DOM]<!--{{DOM}}--> </ a > or the selector of a CSS style
559+ rule.
562560
563561 < li > used "in reverse" to generate markup that would match a given
564562 selector, such as in < a href ="http://haml.info/ "> HAML</ a > or < a
@@ -1385,11 +1383,12 @@ <h3 id=evaluating-selectors><span class=secno>3.2. </span> Evaluating a
13851383 href ="#selector-match-list "> < i > selector match list</ i > </ a > is immediately
13861384 filtered to contain only elements that are either the < a
13871385 href ="#scoping-root "> < i > scoping root</ i > </ a > or descendants of the < a
1388- href ="#scoping-root "> < i > scoping root</ i > </ a > . The selector is processed
1389- from left to right in order, with < a href ="#simple "> < i > simple
1390- selectors</ i > </ a > filtering the < i > selector match set</ i > , and < a
1391- href ="#combinator0 "> < i > combinators</ i > </ a > changing the < i > selector match
1392- set</ i > into something new. If the selector is < a
1386+ href ="#scoping-root "> < i > scoping root</ i > </ a > .
1387+
1388+ < p > The selector is processed from left to right in order, with < a
1389+ href ="#simple "> < i > simple selectors</ i > </ a > filtering the < i > selector match
1390+ set</ i > , and < a href ="#combinator0 "> < i > combinators</ i > </ a > changing the
1391+ < i > selector match set</ i > into something new. If the selector is < a
13931392 href ="#scope-contained "> < i > scope-contained</ i > </ a > then after each < a
13941393 href ="#combinator0 "> < i > combinator</ i > </ a > the < a
13951394 href ="#selector-match-list "> < i > selector match list</ i > </ a > must be
@@ -1400,9 +1399,11 @@ <h3 id=evaluating-selectors><span class=secno>3.2. </span> Evaluating a
14001399 is finished processing, the < a href ="#selector-match-list "> < i > selector
14011400 match list</ i > </ a > must be filtered to contain only elements that are
14021401 either the < a href ="#scoping-root "> < i > scoping root</ i > </ a > or descendants
1403- of the < a href ="#scoping-root "> < i > scoping root</ i > </ a > . When this process
1404- is done, the elements in the < i > selector match set</ i > are the elements
1405- said to match the selector.
1402+ of the < a href ="#scoping-root "> < i > scoping root</ i > </ a > .
1403+
1404+ < p > When this process is done, the elements in the < i > selector match set</ i >
1405+ are the elements said to match the selector. If the order of elements
1406+ matter, they must be sorted in document order, unless otherwise specified.
14061407
14071408 < p > For example, to evaluate the selector "div > i.name" against a document,
14081409 the < a href ="#selector-match-list "> < i > selector match list</ i > </ a > is first
@@ -1643,7 +1644,7 @@ <h4 id=absolutizing><span class=secno>3.6.1. </span> Absolutizing a
16431644 This is because handling an explicitly empty list should return nothing;
16441645 if no :scope elements were given at all, Selectors API 2 should be amended
16451646 to say that the selector must be absolute already. (Broken example: doing
1646- < code > document.find ('img', [list-of-links]))</ code > finds images that are
1647+ < code > document.query ('img', [list-of-links]))</ code > finds images that are
16471648 descendants of links normally, but instead finds all images in the
16481649 document if the list-of-links is empty.)
16491650
@@ -4659,6 +4660,16 @@ <h3 id=informative-references><span class=secno>21.2. </span> Informative
46594660 </ dd >
46604661 <!---->
46614662
4663+ < dt id =ref-DOM > [DOM]
4664+
4665+ < dd > Anne van Kesteren; et al. < a
4666+ href ="http://www.w3.org/TR/2014/WD-dom-20140204/ "> < cite > W3C
4667+ DOM4.</ cite > </ a > 4 February 2014. W3C Last Call Working Draft. (Work in
4668+ progress.) URL: < a
4669+ href ="http://www.w3.org/TR/2014/WD-dom-20140204/ "> http://www.w3.org/TR/2014/WD-dom-20140204/</ a >
4670+ </ dd >
4671+ <!---->
4672+
46624673 < dt id =ref-DOM-LEVEL-3-CORE > [DOM-LEVEL-3-CORE]
46634674
46644675 < dd > Gavin Nicol; et al. < a
0 commit comments