Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various events-related improvements #15133

Merged
merged 10 commits into from Jan 21, 2017

Support document.createElement("beforeunloadevent")

  • Loading branch information
nox committed Jan 21, 2017
commit 03d79185ffb142566cbaf748324063944af915b6
@@ -7,6 +7,7 @@ use devtools_traits::ScriptToDevtoolsControlMsg;
use document_loader::{DocumentLoader, LoadType};
use dom::activation::{ActivationSource, synthetic_click_activation};
use dom::attr::Attr;
use dom::beforeunloadevent::BeforeUnloadEvent;
use dom::bindings::callback::ExceptionHandling;
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods;
@@ -2603,6 +2604,8 @@ impl DocumentMethods for Document {
fn CreateEvent(&self, mut interface: DOMString) -> Fallible<Root<Event>> {
interface.make_ascii_lowercase();
match &*interface {
"beforeunloadevent" =>
Ok(Root::upcast(BeforeUnloadEvent::new_uninitialized(&self.window))),
"closeevent" =>
Ok(Root::upcast(CloseEvent::new_uninitialized(self.window.upcast()))),
"customevent" =>
@@ -3,9 +3,6 @@
[If the event's initialized flag is not set, an InvalidStateError must be thrown (AnimationEvent).]
expected: FAIL
[If the event's initialized flag is not set, an InvalidStateError must be thrown (BeforeUnloadEvent).]
expected: FAIL

[If the event's initialized flag is not set, an InvalidStateError must be thrown (CompositionEvent).]
expected: FAIL

@@ -19,24 +19,6 @@
[createEvent('ANIMATIONEVENT') should be initialized correctly.]
expected: FAIL

[BeforeUnloadEvent should be an alias for BeforeUnloadEvent.]
expected: FAIL

[createEvent('BeforeUnloadEvent') should be initialized correctly.]
expected: FAIL

[beforeunloadevent should be an alias for BeforeUnloadEvent.]
expected: FAIL

[createEvent('beforeunloadevent') should be initialized correctly.]
expected: FAIL

[BEFOREUNLOADEVENT should be an alias for BeforeUnloadEvent.]
expected: FAIL

[createEvent('BEFOREUNLOADEVENT') should be initialized correctly.]
expected: FAIL

[CompositionEvent should be an alias for CompositionEvent.]
expected: FAIL

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.