From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlelem.c | 14 +++++++------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index ca76f8015d2..e9ecfc77a65 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -8084,18 +8084,18 @@ static const dispex_static_data_vtbl_t HTMLAttributeCollection_dispex_vtbl = { .invoke = HTMLAttributeCollection_invoke, };
-static const tid_t HTMLAttributeCollection_iface_tids[] = { +const tid_t NamedNodeMap_iface_tids[] = { IHTMLAttributeCollection_tid, IHTMLAttributeCollection2_tid, IHTMLAttributeCollection3_tid, 0 };
-static dispex_static_data_t HTMLAttributeCollection_dispex = { - "NamedNodeMap", - &HTMLAttributeCollection_dispex_vtbl, - DispHTMLAttributeCollection_tid, - HTMLAttributeCollection_iface_tids +dispex_static_data_t NamedNodeMap_dispex = { + .id = PROT_NamedNodeMap, + .vtbl = &HTMLAttributeCollection_dispex_vtbl, + .disp_tid = DispHTMLAttributeCollection_tid, + .iface_tids = NamedNodeMap_iface_tids, };
HRESULT HTMLElement_get_attr_col(HTMLDOMNode *iface, HTMLAttributeCollection **ac) @@ -8119,7 +8119,7 @@ HRESULT HTMLElement_get_attr_col(HTMLDOMNode *iface, HTMLAttributeCollection **a IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface); This->attrs->elem = This; list_init(&This->attrs->attrs); - init_dispatch(&This->attrs->dispex, &HTMLAttributeCollection_dispex, This->node.doc->script_global, + init_dispatch(&This->attrs->dispex, &NamedNodeMap_dispex, This->node.doc->script_global, dispex_compat_mode(&This->node.event_target.dispex));
*ac = This->attrs; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index ebd0b01751a..f6ebe212b9a 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -463,6 +463,7 @@ typedef struct { X(MimeTypeArray) \ X(MouseEvent) \ X(MutationObserver) \ + X(NamedNodeMap) \ X(Navigator) \ X(Node) \ X(PageTransitionEvent) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 2e514a16f1f..ec69e021e55 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3305,4 +3305,6 @@ sync_test("prototypes", function() { }else { ok(!("DOMTokenList" in window), "DOMTokenList found in window"); } + check(document.body.attributes, NamedNodeMap.prototype, "node map"); + check(NamedNodeMap.prototype, Object.prototype, "node map prototype"); });