Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit "active document" checks #3812

Closed
domenic opened this issue Jul 9, 2018 · 1 comment · Fixed by #6315
Closed

Audit "active document" checks #3812

domenic opened this issue Jul 9, 2018 · 1 comment · Fixed by #6315
Labels
interop Implementations are not interoperable with each other topic: frames/navigables/browsing contexts topic: navigation

Comments

@domenic
Copy link
Member

domenic commented Jul 9, 2018

Most places in the spec that want to disallow "bad documents" from doing things check if the document is fully active.

A few places seem to check whether the document is active. I'm unsure whether this is ever a good idea:

  • Fully active is the more restrictive check. Being more restrictive is generally a good idea in these scenarios.
  • The way the terms are defined, it seems like they're expected to be used with "X is fully active" being a boolean predicate, and "X's active document" being a way of navigating through the spec-object graph. "X is an active document" does not fit super-well with the definitions.

I am not sure I have exhaustively found all such "active document" checks. But, I Ctrl+Fed for "is an active document" and "is not an active document", and found the following:

A plausible path forward here, that I would prefer, is:

  • Fix the interop issues for aborting and document.open()/document.write(), which will result in removing these "active document" checks
  • Change img.decode() to test fully active, not just active
  • Change the document.open()-alias-for-window.open() case either to remove the check, or strengthen it to fully active, depending on the results of interop testing.

This plan may fall apart if my Ctrl+F was incomplete, and I've misunderstood the scope of the problem.

/cc @bzbarsky @annevk as people with lots of knowledge about this area.

@domenic domenic added topic: navigation interop Implementations are not interoperable with each other labels Jul 9, 2018
@clelland
Copy link
Contributor

"active document" is an exported term; there are certainly instances of this outside of the HTML spec as well.

Similar issues can be raised on the appropriate specs, but this may expand the problem scope significantly.

Is there any way to reword "active document" so that it is clear that it should only be used as an attribute of a specific browsing context, and that "active" is not just an adjective that can be applied to documents?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop Implementations are not interoperable with each other topic: frames/navigables/browsing contexts topic: navigation
Development

Successfully merging a pull request may close this issue.

3 participants