For IE modes 8 and above, IHTMLElement::setAttribute uses the underlying nsIDOMElement::SetAttribute, which does nothing since we're already enumerating the ns attributes, and we're supposed to create the DISPIDs for them. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmlelem.c | 5 ++++- dlls/mshtml/tests/documentmode.js | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index d5463f5..f1b09d2 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -6536,7 +6536,10 @@ static HRESULT HTMLElement_populate_props(DispatchEx *dispex) } else V_BSTR(&value) = NULL; - IHTMLElement_setAttribute(&This->IHTMLElement_iface, name, value, 0); + hres = IDispatchEx_GetDispID(&dispex->IDispatchEx_iface, name, fdexNameEnsure | fdexNameCaseInsensitive, &id); + if(SUCCEEDED(hres)) + set_elem_attr_value_by_dispid(This, id, &value); + SysFreeString(name); VariantClear(&value); } diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 7e85af6..9914db9 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -515,19 +515,15 @@ sync_test("createElement_inline_props", function() { e = document.createElement("<div test='a\"' abcd=\""b"\">"); ok(e.tagName === "DIV", "<div test=\"a\" abcd=\"b\">.tagName returned " + e.tagName); - todo_wine_if(v == 8). ok(e.test === "a\"", "<div test='a\"' abcd=\""b"\">.test returned " + e.test); - todo_wine_if(v == 8). ok(e.abcd === "\"b\"", "<div test='a\"' abcd=\""b"\">.abcd returned " + e.abcd); e = document.createElement("<html test='<'>"); ok(e.tagName === "HTML", "<html test='<'>.tagName returned " + e.tagName); - todo_wine_if(v == 8). ok(e.test === "<", "<html test='<'>.test returned " + e.test); e = document.createElement("<body test='>'>"); ok(e.tagName === "BODY", "<body test='>'>.tagName returned " + e.tagName); - todo_wine_if(v == 8). ok(e.test === ">", "<body test='>'>.test returned " + e.test); }else { s = ""; -- 2.31.1