bool EventDispatcher::dispatchEvent(Node* node, PassRefPtr<EventDispatchMediator> mediator) { ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); if (!mediator->event()) return true; EventDispatcher dispatcher(node, mediator->event()); return mediator->dispatchEvent(&dispatcher); }
void EventDispatcher::dispatchScopedEvent(Node* node, PassRefPtr<EventDispatchMediator> mediator) { // We need to set the target here because it can go away by the time we actually fire the event. mediator->event()->setTarget(EventRetargeter::eventTargetRespectingTargetRules(node)); ScopedEventQueue::instance()->enqueueEventDispatchMediator(mediator); }