I *think* (document->domWindow() != nullptr) is the right check for that. It's more typical to see (document->GetFrame() != nullptr) in the code, and that should also work; they should be interchangeable.
On Tue, Feb 22, 2022 at 4:29 AM Raphael Kubo da Costa < [email protected]> wrote: > Hi Blinkers, > > https://html.spec.whatwg.org/multipage/browsers.html#fully-active > specifies what a fully active document is, and several specs check whether > a document is fully active in their algorithms. > > WebKit has Document::isFullyActive(), which essentially implements HTML's > definition: > https://github.com/WebKit/WebKit/blob/ee5042294047abd231e9f86f623d48924cbc2309/Source/WebCore/dom/Document.cpp#L2976 > > We don't seem to have anything similar in Blink though, and as far as I > can see different parts of the code implement that check differently. Some > examples I've encountered so far: > - Check ExecutionContext::IsContextDestroyed() > - Check Document::IsActive() > - Check Document::IsActive() and Document::GetFrame() > - Check ExecutionContextLifecycleObserver::DomWindow() or > ExecutionContextClient::DomWindow() (and optionally check > DomWindow()->GetFrame too) > > Is there a recommendation here? > > -- > You received this message because you are subscribed to the Google Groups > "blink-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c8141c56-158e-fe2d-e5b3-a72201e63327%40intel.com > <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c8141c56-158e-fe2d-e5b3-a72201e63327%40intel.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHOQ7J_xkTqPmHt2zFW3e69nYG_rJvSB90-FYJb3G9wK%2BxnDqw%40mail.gmail.com.
