Make the argument to dispatch_event_with_target non-optional.

The name of the method makes it clear it's supposed to be used with a target
override, so we might as well enforce that.
This commit is contained in:
Ms2ger 2014-12-19 11:34:11 +01:00
parent 7317518c17
commit bce3b172e7
2 changed files with 5 additions and 5 deletions

View file

@ -859,7 +859,7 @@ impl ScriptTask {
EventBubbles::DoesNotBubble,
EventCancelable::NotCancelable).root();
let wintarget: JSRef<EventTarget> = EventTargetCast::from_ref(*window);
let _ = wintarget.dispatch_event_with_target(Some(doctarget), *event);
let _ = wintarget.dispatch_event_with_target(doctarget, *event);
*page.fragment_name.borrow_mut() = final_url.fragment.clone();