Bug 829072 part 2. Move the event handlers that are shared by HTMLElement and Document onto a NodeEventHandlers interface that can be on the RHS of 'implements'. r=peterv

This commit is contained in:
Boris Zbarsky 2013-01-29 08:44:00 -05:00
parent 8caf3e15a8
commit ad5088b00c
4 changed files with 19 additions and 40 deletions

View File

@ -142,18 +142,6 @@ partial interface Document {
//(HTML only)DOMString queryCommandValue(DOMString commandId);
//(Not implemented)readonly attribute HTMLCollection commands;
// event handler IDL attributes
[SetterThrows]
attribute EventHandler onblur;
[SetterThrows]
attribute EventHandler onerror;
[SetterThrows]
attribute EventHandler onfocus;
[SetterThrows]
attribute EventHandler onload;
[SetterThrows]
attribute EventHandler onscroll;
// special event handler IDL attributes that only apply to Document objects
[LenientThis, SetterThrows] attribute EventHandler onreadystatechange;
@ -347,3 +335,4 @@ partial interface Document {
Document implements XPathEvaluator;
Document implements GlobalEventHandlers;
Document implements NodeEventHandlers;

View File

@ -137,3 +137,19 @@ interface GlobalEventHandlers {
[SetterThrows]
attribute EventHandler onmozpointerlockerror;
};
[NoInterfaceObject]
interface NodeEventHandlers {
[SetterThrows]
attribute EventHandler onblur;
// We think the spec is wrong here.
// attribute OnErrorEventHandler onerror;
[SetterThrows]
attribute EventHandler onerror;
[SetterThrows]
attribute EventHandler onfocus;
[SetterThrows]
attribute EventHandler onload;
[SetterThrows]
attribute EventHandler onscroll;
};

View File

@ -76,20 +76,6 @@ interface HTMLElement : Element {
[Constant]
readonly attribute CSSStyleDeclaration style;
// event handler IDL attributes
[SetterThrows]
attribute EventHandler onblur;
// We think the spec is wrong here.
// attribute OnErrorEventHandler onerror;
[SetterThrows]
attribute EventHandler onerror;
[SetterThrows]
attribute EventHandler onfocus;
[SetterThrows]
attribute EventHandler onload;
[SetterThrows]
attribute EventHandler onscroll;
// Mozilla specific stuff
// FIXME Bug 810677 Move className from HTMLElement to Element
attribute DOMString className;
@ -125,5 +111,6 @@ partial interface HTMLElement {
};
HTMLElement implements GlobalEventHandlers;
HTMLElement implements NodeEventHandlers;
interface HTMLUnknownElement : HTMLElement {};

View File

@ -34,20 +34,6 @@ interface SVGElement : Element {
readonly attribute SVGSVGElement? ownerSVGElement;
readonly attribute SVGElement? viewportElement;
// event handler IDL attributes
[SetterThrows]
attribute EventHandler onblur;
// We think the spec is wrong here.
// attribute OnErrorEventHandler onerror;
[SetterThrows]
attribute EventHandler onerror;
[SetterThrows]
attribute EventHandler onfocus;
[SetterThrows]
attribute EventHandler onload;
[SetterThrows]
attribute EventHandler onscroll;
[SetterThrows,Pref="dom.w3c_touch_events.expose"]
attribute EventHandler ontouchstart;
[SetterThrows,Pref="dom.w3c_touch_events.expose"]
@ -70,3 +56,4 @@ interface SVGElement : Element {
};
SVGElement implements GlobalEventHandlers;
SVGElement implements NodeEventHandlers;