Re: [PATCH 3/3] msscript: Implement Language() property
Hi Nikolay, On 06/09/2016 07:40 PM, Nikolay Sivov wrote:
static HRESULT WINAPI ScriptControl_put_Language(IScriptControl *iface, BSTR language) { ScriptControl *This = impl_from_IScriptControl(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(language)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_w(language)); + + if (!lstrcmpiW(language, vbscriptW)) + This->language = LANGUAGE_VBSCRIPT; + else if (!lstrcmpiW(language, jscriptW)) + This->language = LANGUAGE_JSCRIPT; + else if (!language) + This->language = LANGUAGE_UNDEFINED; + else + return CTL_E_INVALIDPROPERTYVALUE;
Are you sure it's limited to those two languages? It counters the point of active script technology. I don't see why it couldn't handle other registered languages. See register_script_engine from MSHTML script.c tests to see how additional languages may be added. Thanks, Jacek
participants (1)
-
Jacek Caban