Jacek Caban (@jacek) commented about dlls/mshtml/htmlwindow.c:
desc->name = prop->name; desc->id = id; desc->flags = PROPF_WRITABLE | PROPF_CONFIGURABLE; - if(prop->type == GLOBAL_DISPEXVAR) - desc->flags |= PROPF_ENUMERABLE; desc->iid = 0; + + switch(prop->type) { + case GLOBAL_SCRIPTVAR: { + IWineJSDispatch *jsdisp; + IDispatch *disp; + + if(!(disp = get_script_disp(prop->script_host))) + return E_UNEXPECTED; + + hres = IDispatch_QueryInterface(disp, &IID_IWineJSDispatch, (void**)&jsdisp);
We have `script_dispex` now in the script host. You could store it as `IWineJSDispatch` and just use it here, without any QI. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6678#note_87837