mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Support document.createElement("beforeunloadevent")
This commit is contained in:
parent
7b4050ea10
commit
03d79185ff
3 changed files with 3 additions and 21 deletions
|
@ -7,6 +7,7 @@ use devtools_traits::ScriptToDevtoolsControlMsg;
|
||||||
use document_loader::{DocumentLoader, LoadType};
|
use document_loader::{DocumentLoader, LoadType};
|
||||||
use dom::activation::{ActivationSource, synthetic_click_activation};
|
use dom::activation::{ActivationSource, synthetic_click_activation};
|
||||||
use dom::attr::Attr;
|
use dom::attr::Attr;
|
||||||
|
use dom::beforeunloadevent::BeforeUnloadEvent;
|
||||||
use dom::bindings::callback::ExceptionHandling;
|
use dom::bindings::callback::ExceptionHandling;
|
||||||
use dom::bindings::cell::DOMRefCell;
|
use dom::bindings::cell::DOMRefCell;
|
||||||
use dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods;
|
use dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods;
|
||||||
|
@ -2603,6 +2604,8 @@ impl DocumentMethods for Document {
|
||||||
fn CreateEvent(&self, mut interface: DOMString) -> Fallible<Root<Event>> {
|
fn CreateEvent(&self, mut interface: DOMString) -> Fallible<Root<Event>> {
|
||||||
interface.make_ascii_lowercase();
|
interface.make_ascii_lowercase();
|
||||||
match &*interface {
|
match &*interface {
|
||||||
|
"beforeunloadevent" =>
|
||||||
|
Ok(Root::upcast(BeforeUnloadEvent::new_uninitialized(&self.window))),
|
||||||
"closeevent" =>
|
"closeevent" =>
|
||||||
Ok(Root::upcast(CloseEvent::new_uninitialized(self.window.upcast()))),
|
Ok(Root::upcast(CloseEvent::new_uninitialized(self.window.upcast()))),
|
||||||
"customevent" =>
|
"customevent" =>
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
[If the event's initialized flag is not set, an InvalidStateError must be thrown (AnimationEvent).]
|
[If the event's initialized flag is not set, an InvalidStateError must be thrown (AnimationEvent).]
|
||||||
expected: FAIL
|
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).]
|
[If the event's initialized flag is not set, an InvalidStateError must be thrown (CompositionEvent).]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -19,24 +19,6 @@
|
||||||
[createEvent('ANIMATIONEVENT') should be initialized correctly.]
|
[createEvent('ANIMATIONEVENT') should be initialized correctly.]
|
||||||
expected: FAIL
|
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.]
|
[CompositionEvent should be an alias for CompositionEvent.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue