Skip to content

Audit "active document" checks #3812

Closed

Description

@domenic

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.

Activity

  1. clelland commented on Jul 10, 2018

    @clelland
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions