tor-browser

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

invalid-uncompiled-raw-handler-compiled-late.window.js (600B)


      1 setup({ allow_uncaught_exception: true });
      2 
      3 test(function() {
      4  var events = [];
      5  window.onerror = function() {
      6    events.push("error");
      7  };
      8 
      9  var div = document.createElement("div");
     10  div.addEventListener("click", function (e) { events.push("click 1") });
     11  div.setAttribute("onclick", "}");
     12  div.addEventListener("click", function (e) { events.push("click 2") });
     13  div.dispatchEvent(new Event("click"));
     14  assert_equals(div.onclick, null);
     15  assert_array_equals(events, ["click 1", "error", "click 2"]);
     16 }, "Invalid uncompiled raw handlers should only be compiled when about to call them");