Skip to content

Commit

Permalink
Reflow the code to be more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
zcorpan committed Sep 17, 2020
1 parent 15a842e commit 0d7c5f3
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions html/semantics/selectors/pseudo-classes/dir.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,45 @@
<bdo dir="ltr" id=bdo5>עברית</bdo>

<script id=script4>
testSelectorIdsMatch(":dir(rtl)", ["bdo1", "bdi2", "bdi4", "span2", "span5", "bdo4"], "':dir(rtl)' matches all elements whose directionality is 'rtl'.");
const rtlElements = [
"bdo1",
"bdi2",
"bdi4",
"span2",
"span5",
"bdo4",
];

var ltrElements = ["html", "head", "meta", "title", "link1", "link2", "script1", "script2", "script3", "style", "body", "log", "bdo2", "bdi1", "bdi3", "span1", "span3", "span4", "span6", "bdo3", "bdo5", "script4"];
testSelectorIdsMatch(":dir(rtl)", rtlElements, "':dir(rtl)' matches all elements whose directionality is 'rtl'.");

const ltrElements = [
"html",
"head",
"meta",
"title",
"link1",
"link2",
"script1",
"script2",
"script3",
"style",
"body",
"log",
"bdo2",
"bdi1",
"bdi3",
"span1",
"span3",
"span4",
"span6",
"bdo3",
"bdo5",
"script4",
];

testSelectorIdsMatch(":dir(ltr)", ltrElements, "':dir(ltr)' matches all elements whose directionality is 'ltr'.");

var bdo = document.createElement("bdo");
const bdo = document.createElement("bdo");
bdo.setAttribute("dir", "ltr");
testSelectorIdsMatch(":dir(ltr)", ltrElements, "':dir(ltr)' doesn't match elements not in the document.");
</script>
Expand Down

0 comments on commit 0d7c5f3

Please sign in to comment.