dom: Add missing event handlers

Adding:
* global event handlers,
* window event handlers,
* document and element handlers,
* and support for BeforeUnloadEvent.

Signed-off-by: Piotr Stankiewicz <bionicrift@gmail.com>
This commit is contained in:
Piotr Stankiewicz 2016-05-15 23:47:15 +01:00
parent 4590fe230f
commit d1af39c114
21 changed files with 373 additions and 861 deletions

View file

@ -2,11 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::EventHandlerBinding::{EventHandlerNonNull, OnBeforeUnloadEventHandlerNonNull};
use dom::bindings::codegen::Bindings::HTMLFrameSetElementBinding;
use dom::bindings::codegen::Bindings::HTMLFrameSetElementBinding::HTMLFrameSetElementMethods;
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::js::Root;
use dom::document::Document;
use dom::htmlelement::HTMLElement;
use dom::node::Node;
use dom::node::{Node, window_from_node};
use string_cache::Atom;
use util::str::DOMString;
@ -33,3 +36,8 @@ impl HTMLFrameSetElement {
Node::reflect_node(box element, document, HTMLFrameSetElementBinding::Wrap)
}
}
impl HTMLFrameSetElementMethods for HTMLFrameSetElement {
// https://html.spec.whatwg.org/multipage/#windoweventhandlers
window_event_handlers!(ForwardToWindow);
}