mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
add popstateevent, hashchangeevent, pagetransitionevent
This commit is contained in:
parent
641b374f0b
commit
11dd0d7c46
13 changed files with 298 additions and 230 deletions
|
@ -44,6 +44,7 @@ use dom::event::{Event, EventBubbles, EventCancelable};
|
|||
use dom::eventtarget::EventTarget;
|
||||
use dom::focusevent::FocusEvent;
|
||||
use dom::forcetouchevent::ForceTouchEvent;
|
||||
use dom::hashchangeevent::HashChangeEvent;
|
||||
use dom::htmlanchorelement::HTMLAnchorElement;
|
||||
use dom::htmlappletelement::HTMLAppletElement;
|
||||
use dom::htmlareaelement::HTMLAreaElement;
|
||||
|
@ -69,6 +70,8 @@ use dom::mouseevent::MouseEvent;
|
|||
use dom::node::{self, CloneChildrenFlag, Node, NodeDamage, window_from_node};
|
||||
use dom::nodeiterator::NodeIterator;
|
||||
use dom::nodelist::NodeList;
|
||||
use dom::pagetransitionevent::PageTransitionEvent;
|
||||
use dom::popstateevent::PopStateEvent;
|
||||
use dom::processinginstruction::ProcessingInstruction;
|
||||
use dom::progressevent::ProgressEvent;
|
||||
use dom::range::Range;
|
||||
|
@ -2195,6 +2198,12 @@ impl DocumentMethods for Document {
|
|||
Ok(Root::upcast(ErrorEvent::new_uninitialized(GlobalRef::Window(&self.window)))),
|
||||
"closeevent" =>
|
||||
Ok(Root::upcast(CloseEvent::new_uninitialized(GlobalRef::Window(&self.window)))),
|
||||
"popstateevent" =>
|
||||
Ok(Root::upcast(PopStateEvent::new_uninitialized(GlobalRef::Window(&self.window)))),
|
||||
"hashchangeevent" =>
|
||||
Ok(Root::upcast(HashChangeEvent::new_uninitialized(GlobalRef::Window(&self.window)))),
|
||||
"pagetransitionevent" =>
|
||||
Ok(Root::upcast(PageTransitionEvent::new_uninitialized(GlobalRef::Window(&self.window)))),
|
||||
_ =>
|
||||
Err(Error::NotSupported),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue