mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
auto merge of #1213 : jdm/servo/loadevent, r=kmcallister
It's good enough for now, since we don't track document resources at all. Should be good enough for #841.
This commit is contained in:
commit
da4ca51049
4 changed files with 54 additions and 3 deletions
|
@ -9,12 +9,14 @@ use dom::node::AbstractNode;
|
|||
use servo_util::tree::{TreeNodeRef};
|
||||
|
||||
// See http://dom.spec.whatwg.org/#concept-event-dispatch for the full dispatch algorithm
|
||||
pub fn dispatch_event(target: AbstractEventTarget, event: AbstractEvent) -> bool {
|
||||
pub fn dispatch_event(target: AbstractEventTarget,
|
||||
pseudo_target: Option<AbstractEventTarget>,
|
||||
event: AbstractEvent) -> bool {
|
||||
assert!(!event.event().dispatching);
|
||||
|
||||
{
|
||||
let event = event.mut_event();
|
||||
event.target = Some(target);
|
||||
event.target = Some(pseudo_target.unwrap_or(target));
|
||||
event.dispatching = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue