Skip to content

Commit

Permalink
Add ability to pass direction
Browse files Browse the repository at this point in the history
  • Loading branch information
aphillips committed Nov 5, 2022
1 parent 47b5ed6 commit 72349af
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions explainers/bidi-html-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@
if (params.has('text')) {
updateDisplay(unescapeUnicode(params.get('text')));
}
if (params.has('dir')) {
var passedDir = params.get('dir').toLowerCase();
switch (passedDir) {
case 'ltr':
case 'rtl':
case 'auto':
document.forms.form.elements.displayMeDir.value = passedDir;
break;
default: // do nothing
}
}
}

function updateFromSelect() {
Expand Down

0 comments on commit 72349af

Please sign in to comment.