Jacek Caban (@jacek) commented about dlls/mshtml/htmlwindow.c:
if(FAILED(hres)) return hres; - - V_VT(&v) = VT_DISPATCH; - V_DISPATCH(&v) = (IDispatch *)&constr->IWineJSDispatchHost_iface; - return dispex_define_property(&This->event_target.dispex, name, PROPF_WRITABLE | PROPF_CONFIGURABLE, &v, dispid); + } + }else { + if(!wcscmp(name, L"Image")) { + if(!This->constructors[CTOR_IMAGE]) { + hres = HTMLImageElementFactory_Create(This, &This->constructors[CTOR_IMAGE]); + if(FAILED(hres)) + return hres; + } + constr = This->constructors[CTOR_IMAGE]; }
Could we extend `init_constructor` mechanism instead? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7779#note_100550