blob: 8afe2e872f0eae3ecd59a387ebcc85fa69a58ca1 [file] [log] [blame]
Test using the descendant combinator with the double-child syntax ">>" in Element.matches().
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.getElementById("target1").matches("body >> target") is true
PASS document.getElementById("target2").matches("body >> target") is true
PASS document.getElementById("target1").matches("target >> container") is false
PASS document.getElementById("target2").matches("target >> container") is false
PASS document.getElementById("container1").matches("target >> container") is false
PASS document.getElementById("container2").matches("target >> container") is false
PASS document.getElementById("container3").matches("target >> container") is false
PASS document.getElementById("target1").matches("container >> target") is true
PASS document.getElementById("target2").matches("container >> target") is true
PASS document.getElementById("container1").matches("container >> target") is false
PASS document.getElementById("container2").matches("container >> target") is false
PASS document.getElementById("container3").matches("container >> target") is false
PASS document.getElementById("target1").matches("container >> container") is false
PASS document.getElementById("target2").matches("container >> container") is false
PASS document.getElementById("container1").matches("container >> container") is false
PASS document.getElementById("container2").matches("container >> container") is true
PASS document.getElementById("container3").matches("container >> container") is true
PASS document.getElementById("target1").matches("body >> container") is false
PASS document.getElementById("target2").matches("body >> container") is false
PASS document.getElementById("container1").matches("body >> container") is true
PASS document.getElementById("container2").matches("body >> container") is true
PASS document.getElementById("container3").matches("body >> container") is true
PASS document.getElementById("target1").matches("container >> *") is true
PASS document.getElementById("target2").matches("container >> *") is true
PASS document.getElementById("container1").matches("container >> *") is false
PASS document.getElementById("container2").matches("container >> *") is true
PASS document.getElementById("container3").matches("container >> *") is true
PASS successfullyParsed is true
TEST COMPLETE