mshtml: Implement IHTMLScriptElement_put_src

Jacek Caban jacek at codeweavers.com
Mon Jun 18 04:32:56 CDT 2012


André,

On 06/15/12 23:45, André Hentschel wrote:
> ---
>  dlls/mshtml/htmlscript.c |   14 ++++++++++++--
>  dlls/mshtml/tests/dom.c  |    6 ++++++
>  2 files changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/dlls/mshtml/htmlscript.c b/dlls/mshtml/htmlscript.c
> index 376db7b..1714cfe 100644
> --- a/dlls/mshtml/htmlscript.c
> +++ b/dlls/mshtml/htmlscript.c
> @@ -101,8 +101,18 @@ static HRESULT WINAPI HTMLScriptElement_Invoke(IHTMLScriptElement *iface, DISPID
>  static HRESULT WINAPI HTMLScriptElement_put_src(IHTMLScriptElement *iface, BSTR v)
>  {
>      HTMLScriptElement *This = impl_from_IHTMLScriptElement(iface);
> -    FIXME("(%p)->(%s)\n", This, debugstr_w(v));
> -    return E_NOTIMPL;
> +    nsAString src_str;
> +    nsresult nsres;
> +
> +    TRACE("(%p)->(%s)\n", This, debugstr_w(v));
> +
> +    nsAString_Init(&src_str, v);
> +    nsres = nsIDOMHTMLScriptElement_SetSrc(This->nsscript, &src_str);
> +    if (NS_FAILED(nsres))
> +        ERR("SetSrc failed: %08x\n", nsres);
> +    nsAString_Finish (&src_str);
> +
> +    return S_OK;
>  }
>

Unfortunately it's not so easy. That won't work this way.

Jacek



More information about the wine-devel mailing list