mshtml: Expose toString() for WineDOMTokenList.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
31883ce4ac
commit
ec665f1c7d
|
@ -6612,6 +6612,15 @@ static HRESULT WINAPI token_list_remove(IWineDOMTokenList *iface, BSTR token)
|
|||
return token_list_add_remove(iface, token, TRUE);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI token_list_toString(IWineDOMTokenList *iface, BSTR *String)
|
||||
{
|
||||
struct token_list *token_list = impl_from_IWineDOMTokenList(iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n", token_list, String);
|
||||
|
||||
return IHTMLElement_get_className(token_list->element, String);
|
||||
}
|
||||
|
||||
static const IWineDOMTokenListVtbl WineDOMTokenListVtbl = {
|
||||
token_list_QueryInterface,
|
||||
token_list_AddRef,
|
||||
|
@ -6622,6 +6631,7 @@ static const IWineDOMTokenListVtbl WineDOMTokenListVtbl = {
|
|||
token_list_Invoke,
|
||||
token_list_add,
|
||||
token_list_remove,
|
||||
token_list_toString
|
||||
};
|
||||
|
||||
static inline struct token_list *token_list_from_DispatchEx(DispatchEx *iface)
|
||||
|
|
|
@ -115,6 +115,8 @@ interface IWineDOMTokenList : IDispatch
|
|||
HRESULT add([in] BSTR token);
|
||||
[id(2)]
|
||||
HRESULT remove([in] BSTR token);
|
||||
[id(3)]
|
||||
HRESULT toString([retval, out] BSTR *String);
|
||||
}
|
||||
|
||||
} /* library MSHTML_private */
|
||||
|
|
|
@ -528,6 +528,7 @@ sync_test("classList", function() {
|
|||
classList.add("c");
|
||||
ok(elem.className === "a b c 4", "(2) Expected className 'a b c 4', got " + elem.className);
|
||||
ok(("" + classList) === "a b c 4", "Expected classList value 'a b c 4', got " + classList);
|
||||
ok(classList.toString() === "a b c 4", "Expected classList toString 'a b c 4', got " + classList.toString());
|
||||
|
||||
var exception = false
|
||||
|
||||
|
@ -609,4 +610,5 @@ sync_test("classList", function() {
|
|||
|
||||
elem.className = " testclass foobar ";
|
||||
ok(("" + classList) === " testclass foobar ", "Expected classList value ' testclass foobar ', got " + classList);
|
||||
ok(classList.toString() === " testclass foobar ", "Expected classList toString ' testclass foobar ', got " + classList.toString());
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue