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

Define "relevant settings object" for any platform object, not just global objects. #564

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 10 additions & 3 deletions source
Expand Up @@ -2852,7 +2852,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn data-noexport="">Supported property names</dfn>
<li><dfn data-noexport="">Unenumerable</dfn>
<li><dfn data-noexport="">Determine the value of a named property</dfn>
<li><dfn data-noexport="" data-x-href="https://heycam.github.io/webidl/#dfn-platform-object">Platform object</dfn></li>
<li><dfn data-noexport="">Platform array objects</dfn>
<li><dfn data-noexport="" data-x-href="https://heycam.github.io/webidl/#es-platform-objects">Global environment associated with</dfn> a platform object</li>
<li><dfn data-noexport="" data-x="dfn-read-only-array">Read only</dfn> (when applied to arrays)
<li><dfn data-noexport="" data-x="dfn-callback-this-value">Callback this value</dfn>
<li><dfn data-noexport="" data-x="concept-idl-convert" data-x-href="https://heycam.github.io/webidl/#es-type-mapping">Converting</dfn> between WebIDL types and JS types
Expand Down Expand Up @@ -85828,9 +85830,13 @@ interface <dfn>NavigatorOnLine</dfn> {
<p>An <span>environment settings object</span>'s <dfn data-x="environment settings object's
Realm">Realm</dfn> is its <span>realm execution context</span>'s Realm component.</p>

<p>The <dfn>relevant settings object for a global object</dfn> <var>o</var> is the
<span>environment settings object</span> whose <span>global object</span> is <var>o</var>.
(There is always a 1:1 mapping of global objects to environment settings objects.)</p>
<p id="relevant-settings-object-for-a-global-object">The <dfn>relevant settings object</dfn> for a
<span>global object</span> <var>o</var> is the <span>environment settings object</span> whose
Copy link
Member

Choose a reason for hiding this comment

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

<p> and </p> inside <dt>s and <dd>s is the prevailing style, I am pretty sure...

Copy link
Member

Choose a reason for hiding this comment

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

Indent one space, not two (here and throughout)

Copy link
Member

Choose a reason for hiding this comment

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

dt doesn't allow p :-)

Copy link
Member

Choose a reason for hiding this comment

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

Huh, seems like it does... But didn't before. Anyway source doesn't contain <dt><p>.

Copy link
Member

Choose a reason for hiding this comment

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

Remove trailing comma in the dts

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed the indent; removed the <dl> entirely per a subsequent comment.

Copy link
Member

Choose a reason for hiding this comment

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

This seems wrong. How about we put the old id on the <p> given that you want both?

Copy link
Member Author

Choose a reason for hiding this comment

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

It turns out that Mixed Content and Secure Contexts already define their own shortcut for "relevant settings object", so omitting the data-lt won't break their builds. It probably will break https://github.com/whatwg/xhr/blob/master/Overview.src.html#L283. Done anyway.

<span>global object</span> is <var>o</var>. The <span>relevant settings object</span> for a
Copy link
Member

Choose a reason for hiding this comment

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

Capitalize <dd> sentence fragments is the prevailing style, it seems.

Although, I am not sure we use <dl class="switch"> for definitions, maybe just for algorithm steps. Finding another example would be helpful...

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I didn't find an exact precedent, so I've removed the <dl>. Not all class="switch" are exactly algorithm steps, but they're all around algorithms.

non-global <span>platform object</span> <var>o</var> is the <span>environment settings
Copy link
Member

Choose a reason for hiding this comment

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

No extra indent. One space between sentences.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

object</span> whose <span>global object</span> is the global object of the <span>global
environment associated with</span> <var>o</var>. (There is always a 1:1 mapping of global objects
to environment settings objects.)</p>
Copy link
Member

Choose a reason for hiding this comment

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

I think we should just use the same phrasing as above: ... whose <span>global object</span> is the ...

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, but I think I like the recursive way better. It's more clear that the steps after getting to a global object are the same.


<p>The <dfn>script corresponding to the running execution context</dfn> is the
<span>script</span> in the [[HostDefined]] slot of the <span>running JavaScript execution
Expand Down Expand Up @@ -118347,6 +118353,7 @@ INSERT INTERFACES HERE
Jeff Cutsinger,
Jeff Schiller,
Jeff Walden,
Jeffrey Yasskin,
Jeffrey Zeldman,
&#32993;&#24935;&#37586; (Jennifer Braithwaite),
Jens Bannmann,
Expand Down