return S_OK;
}
+static HRESULT HTMLFrameElement_get_dispid(HTMLDOMNode *iface, BSTR name,
+ DWORD grfdex, DISPID *pid)
+{
+ HTMLFrameElement *This = HTMLFRAME_NODE_THIS(iface);
+
+ if(!This->framebase.content_window)
+ return DISP_E_UNKNOWNNAME;
+
+ return search_window_props(This->framebase.content_window, name, grfdex, pid);
+}
+
+static HRESULT HTMLFrameElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid,
+ WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
+{
+ HTMLFrameElement *This = HTMLFRAME_NODE_THIS(iface);
+
+ if(!This->framebase.content_window) {
+ ERR("no content window to invoke on\n");
+ return E_FAIL;
+ }
+
+ return IDispatchEx_InvokeEx(DISPATCHEX(This->framebase.content_window), id, lcid, flags, params, res, ei, caller);
+}
+
static HRESULT HTMLFrameElement_bind_to_tree(HTMLDOMNode *iface)
{
HTMLFrameElement *This = HTMLFRAME_NODE_THIS(iface);
NULL,
HTMLFrameElement_get_document,
NULL,
- NULL,
- NULL,
+ HTMLFrameElement_get_dispid,
+ HTMLFrameElement_invoke,
HTMLFrameElement_bind_to_tree
};
return S_OK;
}
+static HRESULT HTMLIFrame_get_dispid(HTMLDOMNode *iface, BSTR name,
+ DWORD grfdex, DISPID *pid)
+{
+ HTMLIFrame *This = HTMLIFRAME_NODE_THIS(iface);
+
+ if(!This->framebase.content_window)
+ return DISP_E_UNKNOWNNAME;
+
+ return search_window_props(This->framebase.content_window, name, grfdex, pid);
+}
+
+static HRESULT HTMLIFrame_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid,
+ WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
+{
+ HTMLIFrame *This = HTMLIFRAME_NODE_THIS(iface);
+
+ if(!This->framebase.content_window) {
+ ERR("no content window to invoke on\n");
+ return E_FAIL;
+ }
+
+ return IDispatchEx_InvokeEx(DISPATCHEX(This->framebase.content_window), id, lcid, flags, params, res, ei, caller);
+}
+
static HRESULT HTMLIFrame_get_readystate(HTMLDOMNode *iface, BSTR *p)
{
HTMLIFrame *This = HTMLIFRAME_NODE_THIS(iface);
NULL,
HTMLIFrame_get_document,
HTMLIFrame_get_readystate,
- NULL,
- NULL,
+ HTMLIFrame_get_dispid,
+ HTMLIFrame_invoke,
HTMLIFrame_bind_to_tree
};
return MSHTML_DISPID_CUSTOM_MIN + (prop-This->global_props);
}
-static HRESULT WINAPI WindowDispEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
+HRESULT search_window_props(HTMLWindow *This, BSTR bstrName, DWORD grfdex, DISPID *pid)
{
- HTMLWindow *This = DISPEX_THIS(iface);
+ DWORD i;
ScriptHost *script_host;
DISPID id;
- DWORD i;
- HRESULT hres;
-
- TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid);
for(i=0; i < This->global_prop_cnt; i++) {
/* FIXME: case sensitivity */
return S_OK;
}
+ return DISP_E_UNKNOWNNAME;
+}
+
+static HRESULT WINAPI WindowDispEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
+{
+ HTMLWindow *This = DISPEX_THIS(iface);
+ HRESULT hres;
+
+ TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid);
+
+ hres = search_window_props(This, bstrName, grfdex, pid);
+ if(hres != DISP_E_UNKNOWNNAME)
+ return hres;
+
hres = IDispatchEx_GetDispID(DISPATCHEX(&This->dispex), bstrName, grfdex, pid);
if(hres != DISP_E_UNKNOWNNAME)
return hres;
void set_script_mode(HTMLWindow*,SCRIPTMODE);
BOOL find_global_prop(HTMLWindow*,BSTR,DWORD,ScriptHost**,DISPID*);
IDispatch *get_script_disp(ScriptHost*);
+HRESULT search_window_props(HTMLWindow*,BSTR,DWORD,DISPID*);
IHTMLElementCollection *create_all_collection(HTMLDOMNode*,BOOL);
IHTMLElementCollection *create_collection_from_nodelist(HTMLDocumentNode*,IUnknown*,nsIDOMNodeList*);