mshtml: Expose the other remaining props for element.classList.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
71d9f327f0
commit
ced7545580
3 changed files with 57 additions and 1 deletions
|
@ -7561,6 +7561,42 @@ static HRESULT WINAPI token_list_remove(IWineDOMTokenList *iface, BSTR token)
|
|||
return token_list_add_remove(iface, token, TRUE);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI token_list_toggle(IWineDOMTokenList *iface, BSTR token, VARIANT_BOOL *p)
|
||||
{
|
||||
struct token_list *token_list = impl_from_IWineDOMTokenList(iface);
|
||||
|
||||
FIXME("(%p)->(%s %p)\n", token_list, debugstr_w(token), p);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI token_list_contains(IWineDOMTokenList *iface, BSTR token, VARIANT_BOOL *p)
|
||||
{
|
||||
struct token_list *token_list = impl_from_IWineDOMTokenList(iface);
|
||||
|
||||
FIXME("(%p)->(%s %p)\n", token_list, debugstr_w(token), p);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI token_list_get_length(IWineDOMTokenList *iface, LONG *p)
|
||||
{
|
||||
struct token_list *token_list = impl_from_IWineDOMTokenList(iface);
|
||||
|
||||
FIXME("(%p)->(%p)\n", token_list, p);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI token_list_item(IWineDOMTokenList *iface, LONG index, VARIANT *p)
|
||||
{
|
||||
struct token_list *token_list = impl_from_IWineDOMTokenList(iface);
|
||||
|
||||
FIXME("(%p)->(%ld %p)\n", token_list, index, p);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI token_list_toString(IWineDOMTokenList *iface, BSTR *String)
|
||||
{
|
||||
struct token_list *token_list = impl_from_IWineDOMTokenList(iface);
|
||||
|
@ -7580,6 +7616,10 @@ static const IWineDOMTokenListVtbl WineDOMTokenListVtbl = {
|
|||
token_list_Invoke,
|
||||
token_list_add,
|
||||
token_list_remove,
|
||||
token_list_toggle,
|
||||
token_list_contains,
|
||||
token_list_get_length,
|
||||
token_list_item,
|
||||
token_list_toString
|
||||
};
|
||||
|
||||
|
|
|
@ -159,6 +159,14 @@ interface IWineDOMTokenList : IDispatch
|
|||
[id(2)]
|
||||
HRESULT remove([in] BSTR token);
|
||||
[id(3)]
|
||||
HRESULT toggle([in] BSTR token, [retval, out] VARIANT_BOOL *p);
|
||||
[id(4)]
|
||||
HRESULT contains([in] BSTR token, [retval, out] VARIANT_BOOL *p);
|
||||
[propget, id(5)]
|
||||
HRESULT length([retval, out] LONG *p);
|
||||
[id(6)]
|
||||
HRESULT item([in] LONG index, [retval, out] VARIANT *p);
|
||||
[id(7)]
|
||||
HRESULT toString([retval, out] BSTR *String);
|
||||
}
|
||||
|
||||
|
|
|
@ -623,7 +623,15 @@ sync_test("hasAttribute", function() {
|
|||
|
||||
sync_test("classList", function() {
|
||||
var elem = document.createElement("div");
|
||||
var classList = elem.classList;
|
||||
var classList = elem.classList, i;
|
||||
|
||||
var props = [ "add", "contains", "item", "length", "remove", "toggle" ];
|
||||
for(i = 0; i < props.length; i++)
|
||||
ok(props[i] in classList, props[i] + " not found in classList.");
|
||||
|
||||
props = [ "entries", "forEach", "keys", "replace", "supports", "value", "values"];
|
||||
for(i = 0; i < props.length; i++)
|
||||
ok(!(props[i] in classList), props[i] + " found in classList.");
|
||||
|
||||
classList.add("a");
|
||||
ok(elem.className === "a", "Expected className 'a', got " + elem.className);
|
||||
|
|
Loading…
Add table
Reference in a new issue