mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Auto merge of #11051 - mrmiywj:closeevent-argument, r=Ms2ger
'closeevent' argument for Document::createEvent Add "close event" argument for Document::createEvent Fixes #10737 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11051) <!-- Reviewable:end -->
This commit is contained in:
commit
a76db9af54
4 changed files with 10 additions and 30 deletions
|
@ -32,6 +32,7 @@ use dom::bindings::trace::RootedVec;
|
|||
use dom::bindings::xmlname::XMLName::InvalidXMLName;
|
||||
use dom::bindings::xmlname::{validate_and_extract, namespace_from_domstring, xml_name_type};
|
||||
use dom::browsingcontext::BrowsingContext;
|
||||
use dom::closeevent::CloseEvent;
|
||||
use dom::comment::Comment;
|
||||
use dom::customevent::CustomEvent;
|
||||
use dom::documentfragment::DocumentFragment;
|
||||
|
@ -2192,6 +2193,8 @@ impl DocumentMethods for Document {
|
|||
Ok(Root::upcast(FocusEvent::new_uninitialized(GlobalRef::Window(&self.window)))),
|
||||
"errorevent" =>
|
||||
Ok(Root::upcast(ErrorEvent::new_uninitialized(GlobalRef::Window(&self.window)))),
|
||||
"closeevent" =>
|
||||
Ok(Root::upcast(CloseEvent::new_uninitialized(GlobalRef::Window(&self.window)))),
|
||||
_ =>
|
||||
Err(Error::NotSupported),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue