summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.window.js
blob: b39b54b0e9cea49e4628b72ddd84e236cb57e77a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
setup({ allow_uncaught_exception: true });

var errors = 0;
window.onerror = function() {
  errors++;
};

test(function() {
  var e = document.body;
  e.setAttribute("onclick", "window.open(");
  assert_equals(e.onclick, null);
  assert_equals(e.onclick, null);
  assert_equals(errors, 1);
}, "Invalid uncompiled raw handlers should only be compiled once");