tor-browser

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

option-text-label.html (778B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <title>HTMLOptionElement.text</title>
      4 <link rel=author title=Ms2ger href="mailto:Ms2ger@gmail.com">
      5 <link rel=help href="https://html.spec.whatwg.org/multipage/#dom-option-text">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <div id=log></div>
      9 <script>
     10 test(function() {
     11  var option = document.createElement("option");
     12  option.setAttribute("label", "label");
     13  option.textContent = "text";
     14  assert_equals(option.text, "text");
     15 }, "Option with non-empty label.");
     16 
     17 test(function() {
     18  var option = document.createElement("option");
     19  option.setAttribute("label", "");
     20  option.textContent = "text";
     21  assert_equals(option.text, "text");
     22 }, "Option with empty label.");
     23 </script>