tor-browser

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

script-onload-string.html (584B)


      1 <!DOCTYPE html>
      2 <title>Script: setting onload to a string</title>
      3 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <div id=log></div>
      7 <script>
      8 test(function() {
      9  var s = document.createElement("script");
     10  assert_equals(s.onload, null);
     11  var dummy = function() {};
     12  s.onload = dummy;
     13  assert_equals(s.onload, dummy);
     14  s.onload = "w('load DOM appended')";
     15  assert_equals(s.onload, null);
     16 }, "Setting onload to a string should convert to null.");
     17 </script>