On 7/19/21 11:55 AM, Paul Gofman wrote:
- TRACE("new %s.\n", debugstr_w(new));
- hr = IHTMLElement_put_className(token_list->element, new);
IHTMLElement_put_className takes BSTR as an argument.
static const tid_t token_list_iface_tids[] = { diff --git a/dlls/mshtml/mshtml_private_iface.idl b/dlls/mshtml/mshtml_private_iface.idl index 1764b0a8c9d..b50d2f9502b 100644 --- a/dlls/mshtml/mshtml_private_iface.idl +++ b/dlls/mshtml/mshtml_private_iface.idl @@ -111,6 +111,8 @@ interface IWineHTMLElementPrivate : IDispatch ] interface IWineDOMTokenList : IDispatch {
- [vararg, id(1)]
- HRESULT add([in] SAFEARRAY(VARIANT) token); }
This should probably just take a single BSTR argument instead. The behaviour that you observe with multiple arguments should probably be handled on dispatch level instead. A quick testing shows that extra argument are generally accepted by any JavaScript function call. This is consistent with how builtin JavaScript functions work. I think it wasn't the case for old IEs, but it looks like recent versions accept it for all compatibility modes.
Thanks,
Jacek