tor-browser

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

ElementInternals-accessibility.tentative.html (829B)


      1 <!DOCTYPE HTML>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <script>
      5 class TestElement extends HTMLElement {
      6  constructor() {
      7    super();
      8    this._internals = this.attachInternals();
      9  }
     10 
     11  get internals() {
     12    return this._internals;
     13  }
     14 
     15  set internals(val) {
     16    throw "Can't set internals!";
     17  }
     18 }
     19 customElements.define("test-element", TestElement);
     20 </script>
     21 
     22 <test-element id= "testElement"></test-element>
     23 
     24 <script>
     25 const element = document.getElementById("testElement");
     26 
     27 
     28 // tentative properties
     29 const properties = [
     30  "ariaColIndexText",
     31  "ariaDescription",
     32  "ariaRowIndexText",
     33 ];
     34 
     35 for (const property of properties) {
     36  test(() => {
     37    assert_inherits(element.internals, property);
     38  }, property + " is defined in ElementInternals");
     39 }
     40 
     41 </script>