Auto merge of #9755 - jdm:handlerreturn, r=jdm

use return value of invoking event handlers to cancel the event

Rebased from #8707. Fixes #8490. We can modify the code and test as necessary whenever we make a decision about https://github.com/whatwg/html/issues/423 in the future.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9755)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-02-27 07:10:50 +05:30
commit 8bdffa25f9
9 changed files with 141 additions and 58 deletions

View file

@ -23,18 +23,22 @@ typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
[NoInterfaceObject]
interface GlobalEventHandlers {
attribute EventHandler onblur;
attribute EventHandler onchange;
attribute EventHandler onclick;
attribute EventHandler ondblclick;
attribute OnErrorEventHandler onerror;
attribute EventHandler onload;
attribute EventHandler oninput;
attribute EventHandler onkeydown;
attribute EventHandler onkeypress;
attribute EventHandler onkeyup;
attribute EventHandler onchange;
attribute EventHandler onload;
attribute EventHandler onmouseover;
attribute EventHandler onreset;
attribute EventHandler onresize;
attribute EventHandler onsubmit;
attribute EventHandler ontoggle;
attribute EventHandler onresize;
};
[NoInterfaceObject]