tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

dir-auto-div-append-child.html (783B)


      1 <!DOCTYPE html>
      2 <title>HTML Test: input with dir=auto, then append a child</title>
      3 <meta charset="utf-8">
      4 <meta name="assert" content="The dir global attribute set to auto applies when a child is appended" />
      5 <link rel="author" title="HTML5 bidi test WG" href="mailto:japhet@chromium.org" />
      6 <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-dir-attribute" />
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 <body>
     10 <div id="div" dir="auto"></div>
     11 <script>
     12 test(() => {
     13  assert_equals(getComputedStyle(div).direction, "ltr");
     14  div.appendChild(document.createTextNode('اختبر SomeText'));
     15  assert_equals(getComputedStyle(div).direction, "rtl");
     16 }, 'dir auto: updates on appendChild');
     17 </script>
     18 </body>