mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
mshtml: Added support for IHTMLScriptElement::put_src on detached elements.
This commit is contained in:
parent
ccbee09f7e
commit
b882b18402
3 changed files with 23 additions and 2 deletions
|
@ -138,8 +138,9 @@ static HRESULT WINAPI HTMLScriptElement_put_src(IHTMLScriptElement *iface, BSTR
|
|||
|
||||
nsres = nsIDOMHTMLScriptElement_GetParentNode(This->nsscript, &parent);
|
||||
if(NS_FAILED(nsres) || !parent) {
|
||||
FIXME("No parent, not supported detached elements\n");
|
||||
return E_NOTIMPL;
|
||||
TRACE("No parent, not executing\n");
|
||||
This->parse_on_bind = TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
nsIDOMNode_Release(parent);
|
||||
|
|
|
@ -23,6 +23,7 @@ typedef struct {
|
|||
|
||||
nsIDOMHTMLScriptElement *nsscript;
|
||||
BOOL parsed;
|
||||
BOOL parse_on_bind;
|
||||
} HTMLScriptElement;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -629,6 +629,7 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
|
|||
HTMLDocumentNode *This = impl_from_nsIDocumentObserver(iface);
|
||||
nsIDOMHTMLIFrameElement *nsiframe;
|
||||
nsIDOMHTMLFrameElement *nsframe;
|
||||
nsIDOMHTMLScriptElement *nsscript;
|
||||
nsIDOMComment *nscomment;
|
||||
nsIDOMElement *nselem;
|
||||
nsresult nsres;
|
||||
|
@ -667,6 +668,24 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
|
|||
nsIDOMHTMLFrameElement_Release(nsframe);
|
||||
return;
|
||||
}
|
||||
|
||||
nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMHTMLScriptElement, (void**)&nsscript);
|
||||
if(NS_SUCCEEDED(nsres)) {
|
||||
HTMLScriptElement *script_elem;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("script element\n");
|
||||
|
||||
hres = script_elem_from_nsscript(This, nsscript, &script_elem);
|
||||
nsIDOMHTMLScriptElement_Release(nsscript);
|
||||
if(FAILED(hres))
|
||||
return;
|
||||
|
||||
if(script_elem->parse_on_bind)
|
||||
add_script_runner(This, run_insert_script, (nsISupports*)nsscript, NULL);
|
||||
|
||||
IHTMLScriptElement_Release(&script_elem->IHTMLScriptElement_iface);
|
||||
}
|
||||
}
|
||||
|
||||
static void NSAPI nsDocumentObserver_AttemptToExecuteScript(nsIDocumentObserver *iface, nsIContent *aContent,
|
||||
|
|
Loading…
Reference in a new issue