On Fri Nov 11 18:24:52 2022 +0000, Gabriel Ivăncescu wrote:
Unfortunately those don't help. The Protocol handler is not called at all after the navigation is issued (tracing all the methods). Even reporting the mime type on the old page didn't change a thing. It's also useful to note that this happens on all navigations, not just `put_href`. `replace` for example, but also `window.navigate` or `window.open` (with _self obviously). However, I looked at why `navigation.js` works, since it navigates, but it turns out this is only an issue on top-level windows. iframes work fine and do use the protocol handler (I changed the URL from `about:blank` to something with http for the handler, traced and it gets called…). I don't know if this is deliberate or a bug in Windows' urlmon. But it seems it ignores temporary pluggable namespace handlers when doing any sort of navigation on the top level window. But only the top-level. I resorted to keep the `IPersistMoniker_Load` way, but I had to add `IHlinkTarget_Navigate`, otherwise unload events wouldn't be dispatched (this is for next MR, not tested here).
Note that it works fine in `test_put_href`, so it seems to be specific to something we do in events.c rather than a Windows bug.