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

Remove "responsible document" concept #7694

Merged
merged 1 commit into from
Mar 16, 2022
Merged

Remove "responsible document" concept #7694

merged 1 commit into from
Mar 16, 2022

Conversation

domenic
Copy link
Member

@domenic domenic commented Mar 9, 2022

It was confusing to have this as a generic on environment settings objects, since it only applied to window environment settings objects. Instead, specifications should get the Window object's associated Document directly, if necessary by looking at the settings object's global object (which will, in some cases, be a Window object).

Closes #4335.

Per WebDex this term is used a lot!! I'm unsure what we should do here. Just merge and break a bunch of specs? (We've done it in the past, but now we have WebDex to tell us how much damage we'd cause!) Preserve the ID, perhaps on concept-document-window? Prepare PRs for at least WHATWG specs like Compat and XHR?

Specific migration guide:

  • If you already have a Window object, use |window|'s [=associated Document=] instead.
  • If you have some other platform object (e.g. a [=this=] value), use |object|'s [=relevant global object=]'s [=associated Document=].
  • If you are trying to check that an environment settings object corresponds to a Window/Document, use |eso|'s [=environment settings object/global object=] is a {{Window}}.
  • If you are trying to check that a platform object is existing in a Window/Document context, use |object|'s [=relevant global object=] is a {{Window}}.
  • If you are using it as a bare term, e.g. "Return the responsible document's X", then your spec is very buggy. You need to start from some existing object and traverse to the document, e.g. Return [=this=]'s [=relevant global object=]'s [=associated Document=].

/history.html ( diff )
/rendering.html ( diff )
/web-messaging.html ( diff )
/webappapis.html ( diff )
/window-object.html ( diff )
/workers.html ( diff )
/worklets.html ( diff )

It was confusing to have this as a generic on environment settings objects, since it only applied to window environment settings objects. Instead, specifications should get the Window object's associated Document directly, if necessary by looking at the settings object's global object (which will, in some cases, be a Window object).

Closes #4335.
@domenic domenic added the clarification Standard could be clearer label Mar 9, 2022
@zcorpan
Copy link
Member

zcorpan commented Mar 10, 2022

Prepare PRs for at least WHATWG specs like Compat and XHR?

IMO, yes, and file issues (or PRs) for all affected specs.

annevk added a commit to whatwg/xhr that referenced this pull request Mar 10, 2022
annevk added a commit to whatwg/xhr that referenced this pull request Mar 11, 2022
annevk added a commit to whatwg/xhr that referenced this pull request Mar 15, 2022
@miketaylr
Copy link
Member

@domenic I think there should be a PR or an issue for everything under https://dontcallmedom.github.io/webdex/r.html#responsible%20document%40%40environment%20settings%20object%40dfn now (xhr still shows up, but I think that's due to whatwg/xhr#345)

@domenic
Copy link
Member Author

domenic commented Mar 15, 2022

OMG, thank you so much for doing all that work; that's amazing!

@domenic domenic requested a review from annevk March 15, 2022 18:14
@domenic domenic merged commit 4d422bd into main Mar 16, 2022
@domenic domenic deleted the responsible-document branch March 16, 2022 14:06
rsolomakhin added a commit to WICG/digital-goods that referenced this pull request Mar 18, 2022
Use associated Document in place of responsible document,
because the latter concept was removed. cf. whatwg/html#7694
johannhof added a commit to johannhof/feature-policy that referenced this pull request Mar 24, 2022
clelland pushed a commit to w3c/webappsec-permissions-policy that referenced this pull request Mar 25, 2022
* Replace usage of "responsible document"

See whatwg/html#7694

* Use the relevant global object
Bishwarupjee pushed a commit to Bishwarupjee/xhr that referenced this pull request Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer
Development

Successfully merging this pull request may close these issues.

Consider removing settings object's responsible document
4 participants