File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed
Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -648688,6 +648688,13 @@
648688648688 {}
648689648689 ]
648690648690 ],
648691+ "elements-are-parents-of-their-attributes.html": [
648692+ "63e6cfe4cc586c799a1b7f625407e64260e44b55",
648693+ [
648694+ null,
648695+ {}
648696+ ]
648697+ ],
648691648698 "evaluator-constructor.html": [
648692648699 "8350ceb4499d570c577f9aec674435b415b6672b",
648693648700 [
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < title > Relationship between elements and their attributes</ title >
5+ < link rel ="author " title ="Simon Wülker " href ="mailto:simon.wuelker@arcor.de ">
6+ < link rel ="help " href ="https://www.w3.org/TR/1999/REC-xpath-19991116/#attribute-nodes ">
7+ < script src ="/resources/testharness.js "> </ script >
8+ < script src ="/resources/testharnessreport.js "> </ script >
9+ </ head >
10+ < body >
11+ < div id ="context " foo ="bar "> </ div >
12+ < script >
13+ const context = document . getElementById ( "context" ) ;
14+
15+ test ( ( ) => {
16+ const result = document . evaluate (
17+ "@foo/parent::*" ,
18+ context ,
19+ null ,
20+ XPathResult . ORDERED_NODE_ITERATOR_TYPE ,
21+ null
22+ ) ;
23+
24+ assert_equals ( result . iterateNext ( ) , context ) ;
25+ assert_equals ( result . iterateNext ( ) , null ) ;
26+ } , "Elements are parents of their attributes" ) ;
27+
28+ test ( ( ) => {
29+ const result = document . evaluate (
30+ "node()" ,
31+ context ,
32+ null ,
33+ XPathResult . ORDERED_NODE_ITERATOR_TYPE ,
34+ null
35+ ) ;
36+
37+ assert_equals ( result . iterateNext ( ) , null ) ;
38+ } , "Attributes are not children of their parents" ) ;
39+ </ script >
40+ </ body >
41+ </ html >
You can’t perform that action at this time.
0 commit comments