mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Inline dom::eventdispatcher into dom::event
This commit is contained in:
parent
7aea6e6ea3
commit
7dd5945237
8 changed files with 283 additions and 301 deletions
|
@ -22,8 +22,7 @@ use dom::bindings::reflector::{DomObject, Reflector};
|
|||
use dom::bindings::str::DOMString;
|
||||
use dom::element::Element;
|
||||
use dom::errorevent::ErrorEvent;
|
||||
use dom::event::{Event, EventBubbles, EventCancelable};
|
||||
use dom::eventdispatcher::{EventStatus, dispatch_event};
|
||||
use dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
|
||||
use dom::node::document_from_node;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom::window::Window;
|
||||
|
@ -300,11 +299,11 @@ impl EventTarget {
|
|||
pub fn dispatch_event_with_target(&self,
|
||||
target: &EventTarget,
|
||||
event: &Event) -> EventStatus {
|
||||
dispatch_event(self, Some(target), event)
|
||||
event.dispatch(self, Some(target))
|
||||
}
|
||||
|
||||
pub fn dispatch_event(&self, event: &Event) -> EventStatus {
|
||||
dispatch_event(self, None, event)
|
||||
event.dispatch(self, None)
|
||||
}
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/#event-handler-attributes:event-handlers-11
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue