mshtml: Don't expose document.onstorage for IE9+ modes.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
Gabriel Ivăncescu 2022-09-13 19:57:37 +03:00 committed by Alexandre Julliard
parent ae1d54da51
commit e64ab65a5e
2 changed files with 6 additions and 1 deletions

View file

@ -5978,6 +5978,10 @@ static void HTMLDocumentNode_init_dispex_info(dispex_data_t *info, compat_mode_t
{DISPID_IHTMLDOCUMENT2_LOCATION, HTMLDocumentNode_location_hook},
{DISPID_UNKNOWN}
};
static const dispex_hook_t document6_ie9_hooks[] = {
{DISPID_IHTMLDOCUMENT6_ONSTORAGE},
{DISPID_UNKNOWN}
};
HTMLDOMNode_init_dispex_info(info, mode);
@ -5992,7 +5996,7 @@ static void HTMLDocumentNode_init_dispex_info(dispex_data_t *info, compat_mode_t
dispex_info_add_interface(info, IHTMLDocument3_tid, NULL);
dispex_info_add_interface(info, IHTMLDocument6_tid, NULL);
}else {
dispex_info_add_interface(info, IHTMLDocument6_tid, NULL);
dispex_info_add_interface(info, IHTMLDocument6_tid, mode >= COMPAT_MODE_IE9 ? document6_ie9_hooks : NULL);
dispex_info_add_interface(info, IHTMLDocument3_tid, NULL);
}
dispex_info_add_interface(info, IHTMLDocument2_tid, document2_hooks);

View file

@ -312,6 +312,7 @@ sync_test("doc_props", function() {
var v = document.documentMode;
test_exposed("onstorage", v < 9);
test_exposed("textContent", v >= 9);
test_exposed("prefix", v >= 9);
test_exposed("defaultView", v >= 9);