On Thu Apr 25 17:44:33 2024 +0000, Gabriel Ivăncescu wrote:
Actually wait nevermind, we can't use the IJSDispatchHost for functions, because functions can be completely detached from the object:
var a = document.createEvent; a(...)
I remember I did try that at first and it was a dead end.
If "this" object is not MSHTML object, then we know that it doesn't implement the required interface and we throw an appropriate error. The code from your example should fail, unless I'm missing something. It's really the same: it would get the default "this" handling, which means that "this" object doesn't implement the required interface. (That code could work in older compat modes, where functions were tied to object instances, but it's a very different semantics and not interesting for the interface).
For `IID`, it seems to me that the first step would be to replace `proxy_func_invoker` with just `IID`, you already have `DISPID` anyway.
And yes, for `prop_fixup` I meant something like that. It may be more convenient to have an ID-based variant (instead of name lookup), possibly not, I'm not sure.