mirror of
https://github.com/servo/servo.git
synced 2025-06-24 00:54:32 +01:00
Implement CustomEvent (#2173)
This commit is contained in:
parent
c753f3ee05
commit
4c997e8934
6 changed files with 121 additions and 3 deletions
|
@ -13,6 +13,7 @@ use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
|||
use dom::bindings::error::{ErrorResult, Fallible, NotSupported, InvalidCharacter, HierarchyRequest, NamespaceError};
|
||||
use dom::bindings::utils::{xml_name_type, InvalidXMLName, Name, QName};
|
||||
use dom::comment::Comment;
|
||||
use dom::customevent::CustomEvent;
|
||||
use dom::documentfragment::DocumentFragment;
|
||||
use dom::documenttype::DocumentType;
|
||||
use dom::domimplementation::DOMImplementation;
|
||||
|
@ -534,6 +535,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
|||
// FIXME: Implement CustomEvent (http://dom.spec.whatwg.org/#customevent)
|
||||
"uievents" | "uievent" => Ok(EventCast::from_temporary(UIEvent::new_uninitialized(&*window))),
|
||||
"mouseevents" | "mouseevent" => Ok(EventCast::from_temporary(MouseEvent::new_uninitialized(&*window))),
|
||||
"customevent" => Ok(EventCast::from_temporary(CustomEvent::new_uninitialized(&*window))),
|
||||
"htmlevents" | "events" | "event" => Ok(Event::new(&*window)),
|
||||
_ => Err(NotSupported)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue