Bug 829072 part 3. Move the event handlers that are shared by HTMLBodyElement, HTMLFramesetElement, and Window onto a WindowEventHandlers 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
Родитель 527c8d1698
Коммит f16c3128f4
3 изменённых файлов: 42 добавлений и 71 удалений

Просмотреть файл

@ -153,3 +153,41 @@ interface NodeEventHandlers {
[SetterThrows]
attribute EventHandler onscroll;
};
[NoInterfaceObject]
interface WindowEventHandlers {
[SetterThrows]
attribute EventHandler onafterprint;
[SetterThrows]
attribute EventHandler onbeforeprint;
[SetterThrows]
attribute BeforeUnloadEventHandler onbeforeunload;
// For now, onerror comes from NodeEventHandlers
// When we convert Window to WebIDL this may need to change.
// [SetterThrows]
// attribute OnErrorEventHandler onerror;
//(Not implemented)[SetterThrows]
//(Not implemented)attribute EventHandler onfullscreenchange;
//(Not implemented)[SetterThrows]
//(Not implemented)attribute EventHandler onfullscreenerror;
[SetterThrows]
attribute EventHandler onhashchange;
[SetterThrows]
attribute EventHandler onmessage;
[SetterThrows]
attribute EventHandler onoffline;
[SetterThrows]
attribute EventHandler ononline;
[SetterThrows]
attribute EventHandler onpagehide;
[SetterThrows]
attribute EventHandler onpageshow;
[SetterThrows]
attribute EventHandler onpopstate;
[SetterThrows]
attribute EventHandler onresize;
//(Not implemented)[SetterThrows]
//(Not implemented)attribute EventHandler onstorage;
[SetterThrows]
attribute EventHandler onunload;
};

Просмотреть файл

@ -12,42 +12,6 @@
*/
interface HTMLBodyElement : HTMLElement {
[SetterThrows]
attribute EventHandler onafterprint;
[SetterThrows]
attribute EventHandler onbeforeprint;
[SetterThrows]
attribute BeforeUnloadEventHandler onbeforeunload;
//[SetterThrows]
//attribute EventHandler onblur;
//[SetterThrows]
//attribute OnErrorEventHandler onerror;
//[SetterThrows]
//attribute EventHandler onfocus;
[SetterThrows]
attribute EventHandler onhashchange;
//[SetterThrows]
//attribute EventHandler onload;
[SetterThrows]
attribute EventHandler onmessage;
[SetterThrows]
attribute EventHandler onoffline;
[SetterThrows]
attribute EventHandler ononline;
[SetterThrows]
attribute EventHandler onpopstate;
[SetterThrows]
attribute EventHandler onpagehide;
[SetterThrows]
attribute EventHandler onpageshow;
[SetterThrows]
attribute EventHandler onresize;
//[SetterThrows]
//attribute EventHandler onscroll;
//[SetterThrows]
//attribute EventHandler onstorage;
[SetterThrows]
attribute EventHandler onunload;
};
partial interface HTMLBodyElement {
@ -58,3 +22,5 @@ partial interface HTMLBodyElement {
[TreatNullAs=EmptyString, SetterThrows] attribute DOMString bgColor;
[SetterThrows] attribute DOMString background;
};
HTMLBodyElement implements WindowEventHandlers;

Просмотреть файл

@ -16,39 +16,6 @@ interface HTMLFrameSetElement : HTMLElement {
attribute DOMString cols;
[SetterThrows]
attribute DOMString rows;
[SetterThrows]
attribute EventHandler onafterprint;
[SetterThrows]
attribute EventHandler onbeforeprint;
[SetterThrows]
attribute BeforeUnloadEventHandler onbeforeunload;
//[SetterThrows]
//attribute EventHandler onblur;
//[SetterThrows]
//attribute EventHandler onerror;
//[SetterThrows]
//attribute EventHandler onfocus;
[SetterThrows]
attribute EventHandler onhashchange;
//attribute EventHandler onload;
[SetterThrows]
attribute EventHandler onmessage;
[SetterThrows]
attribute EventHandler onoffline;
[SetterThrows]
attribute EventHandler ononline;
[SetterThrows]
attribute EventHandler onpagehide;
[SetterThrows]
attribute EventHandler onpageshow;
[SetterThrows]
attribute EventHandler onpopstate;
[SetterThrows]
attribute EventHandler onresize;
//[SetterThrows]
//attribute EventHandler onscroll;
//[SetterThrows]
//attribute EventHandler onstorage;
[SetterThrows]
attribute EventHandler onunload;
};
HTMLFrameSetElement implements WindowEventHandlers;