Skip to content

forget() with not-fully-active document rejects with InvalidStateError - #172

Open
nondebug wants to merge 2 commits into
mainfrom
forget-invalid-state-error
Open

nondebug wants to merge 2 commits into
mainfrom
forget-invalid-state-error

Conversation

@nondebug

@nondebug nondebug commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #144

  • At least two implementers are interested (and none opposed):
    • …
    • …
  • Tests are written and can be reviewed and commented upon at:
    • …
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
  • MDN issue is filed: …
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

@nondebug
nondebug requested a review from reillyeon October 30, 2026 11:51
Comment thread index.bs
Comment on lines 1245 to +1249
1. Let |promise| be [=a new promise=].
1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not
[=fully active=], then:
1. [=Reject=] |promise| with an "{{InvalidStateError}}" {{DOMException}}.
1. Return |promise|.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Let |promise| be [=a new promise=].
1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not
[=fully active=], then:
1. [=Reject=] |promise| with an "{{InvalidStateError}}" {{DOMException}}.
1. Return |promise|.
1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not
[=fully active=], then return [=a promise rejected with=]| an
"{{InvalidStateError}}" {{DOMException}} and abort these steps.
1. Let |promise| be [=a new promise=].

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Clarify HIDDevice.forget() behavior when the document is not fully active

2 participants