On Tue Dec 5 17:04:02 2023 +0000, Gabriel Ivăncescu wrote:
I see, I thought as much but confused a bit with the edit mode check. Do you have any suggestions? Basically, my dilemma is that checking for `dom_interactive_time` fails some tests in `htmldoc.c` because setup_edit_mode will set the readystate back to uninitialized, and then load the doc again, but the dom_interactive_time is kept the same and thus the tests will fail. I don't understand how the setup_edit_mode thing works at all, mind explaining a bit? Should I just reset `dom_interactive_time` there to 0, or something else? The thing is, based on my current knowledge of how the binding works, this creates a **new** document and this one gets detached, doesn't it? So checking for the readystate *of the new document* seems a bit… working by pure luck? Or I got it completely wrong.
Yes, it may reload the page, which may change the underlying document. Note that callers will usually use HTMLDocumentObj to call those functions, so after reload it will simply be forwarded to the new document node. Returning `OLECMDF_SUPPORTED` when it's somehow called on a detached node seems good enough for now. (FWIW, looking at this, it already makes questionable assumptions about operating on the main document, let's just not make it worse).