Commit eda756db authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added support for binding ActiveX events with script event attribute.

parent aaabec2b
......@@ -17,6 +17,7 @@
*/
typedef struct HTMLPluginContainer HTMLPluginContainer;
typedef struct PHEventSink PHEventSink;
typedef struct {
IOleClientSite IOleClientSite_iface;
......@@ -43,6 +44,7 @@ typedef struct {
HTMLDocumentNode *doc;
struct list entry;
PHEventSink *sink;
HTMLPluginContainer *element;
} PluginHost;
......@@ -71,3 +73,4 @@ HRESULT get_plugin_disp(HTMLPluginContainer*,IDispatch**) DECLSPEC_HIDDEN;
HRESULT get_plugin_dispid(HTMLPluginContainer*,WCHAR*,DISPID*) DECLSPEC_HIDDEN;
HRESULT invoke_plugin_prop(HTMLPluginContainer*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*) DECLSPEC_HIDDEN;
void notif_container_change(HTMLPluginContainer*,DISPID);
void bind_activex_event(HTMLDocumentNode*,HTMLPluginContainer*,WCHAR*,IDispatch*) DECLSPEC_HIDDEN;
......@@ -1065,6 +1065,8 @@ static BOOL parse_event_str(WCHAR *event, const WCHAR **args)
{
WCHAR *ptr;
TRACE("%s\n", debugstr_w(event));
for(ptr = event; isalnumW(*ptr); ptr++);
if(!*ptr) {
*args = NULL;
......@@ -1079,8 +1081,9 @@ static BOOL parse_event_str(WCHAR *event, const WCHAR **args)
while(isalnumW(*ptr) || isspaceW(*ptr) || *ptr == ',')
ptr++;
if(*ptr++ != ')')
if(*ptr != ')')
return FALSE;
*ptr++ = 0;
return !*ptr;
}
......@@ -1203,7 +1206,7 @@ void bind_event_scripts(HTMLDocumentNode *doc)
IHTMLElement_QueryInterface(&event_target->IHTMLElement_iface, &IID_HTMLPluginContainer, (void**)&plugin_container);
if(plugin_container)
FIXME("ActiveX events not supported\n");
bind_activex_event(doc, plugin_container, event, event_disp);
else
bind_elem_event(doc, event_target, event, event_disp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment