From 67cb39b270b4a6d78c43aeebd5109b8aca597b8b Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 2 May 2016 14:05:38 +0200 Subject: [PATCH] mshtml: Bind load event directly to the target. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/mshtml/htmlelem.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index d5729b1a27f..033800b48e0 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -4267,7 +4267,16 @@ static event_target_t **HTMLElement_get_event_target_ptr(DispatchEx *dispex) static void HTMLElement_bind_event(DispatchEx *dispex, int eid) { HTMLElement *This = impl_from_DispatchEx(dispex); - This->node.doc->node.event_target.dispex.data->vtbl->bind_event(&This->node.doc->node.event_target.dispex, eid); + + static const WCHAR loadW[] = {'l','o','a','d',0}; + + switch(eid) { + case EVENTID_LOAD: + add_nsevent_listener(This->node.doc, This->node.nsnode, loadW); + return; + default: + This->node.doc->node.event_target.dispex.data->vtbl->bind_event(&This->node.doc->node.event_target.dispex, eid); + } } static const tid_t HTMLElement_iface_tids[] = {