On Mon Sep 4 16:26:33 2023 +0000, Jacek Caban wrote:
The inner window is an implementation detail and should never be accessed directly by non-mshtml code.
This is not true. We currently pass inner window as a script global object and the attached [test](/uploads/2621613fc9e1ca17295d37b0b9cbb6b3/patch.diff) shows that we shouldn't use outer windows there. I don't remember details, but I recall seeing similar things in dom.c tests. It's likely that we don't handle it exactly like native does, so there may room for improvements, but generally it makes sense for the global script object to not follow navigation.
I'll have to look into this, but AFAIK it was exactly script hosts that I wrote tests for (well semi hackish for now) that required outer window, because they can get "moved" if e.g. initialized on initial empty doc. But at least for jscript code (not the engine) it seems it's always the outer window.