-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[render-blocking] Fix implicitly-render-blocking definition. #10214
base: main
Are you sure you want to change the base?
Conversation
@annevk I'd appreciate a sanity-check on the approach. I can go file bugs and write tests if this looks good to you. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for writing this up. I think this generally works, but there's some feedback to address.
@@ -62237,11 +62253,16 @@ o............A....e | |||
|
|||
<hr> | |||
|
|||
<p>A <code>script</code> element on creation sets its | |||
<span>[[ImplicitlyPotentiallyRenderBlocking]]</span> slot to true if the element was created by | |||
its <span>node document</span>'s parser.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. I wonder if we can move all these parser-related requirements to the parser directly. That'd be slightly more explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know roughly where that'd go, happy to give that a shot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in https://html.spec.whatwg.org/#create-an-element-for-the-token would probably make sense.
As per discussion in whatwg#10145.
46598a0
to
6171a58
Compare
@@ -1838,6 +1838,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute | |||
<li><p>If <var>removedNode</var>'s <code data-x="attr-popover">popover</code> attribute is not in | |||
the <span data-x="attr-popover-none-state">no popover state</span>, then run the <span>hide | |||
popover algorithm</span> given <var>removedNode</var>, false, false, and false.</p></li> | |||
|
|||
<li><p>Set <var>removedNode</var>'s <span>implicitly potentially render-blocking flag</span> to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No flag suffix please for new state.
<dfn>implicitly potentially render-blocking</dfn>. Elements are not <span>implicitly potentially | ||
render-blocking</span> by default.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this meant to reference the boolean state or is this another piece of state or abstraction?
@@ -62237,11 +62253,16 @@ o............A....e | |||
|
|||
<hr> | |||
|
|||
<p>A <code>script</code> element on creation sets its | |||
<span>[[ImplicitlyPotentiallyRenderBlocking]]</span> slot to true if the element was created by | |||
its <span>node document</span>'s parser.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in https://html.spec.whatwg.org/#create-an-element-for-the-token would probably make sense.
<p>A <code>style</code> element is <span>implicitly potentially render-blocking</span> if its | ||
<span>implicitly potentially render-blocking flag</span> is true.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we have to say this here. We can just rely on the "potentially render-blocking" definition for element, no?
Same for the instances below.
<p>A <code>script</code> element <var>el</var> is <span>implicitly potentially | ||
render-blocking</span> if <var>el</var>'s <span data-x="concept-script-type">type</span> is | ||
"<code data-x="">classic</code>", <var>el</var> is <span>parser-inserted</span>, and | ||
<var>el</var> does not have an <code data-x="attr-script-async">async</code> or <code | ||
data-x="attr-script-defer">defer</code> attribute.</p> | ||
render-blocking</span> if <var>el</var>'s <span>implicitly potentially render-blocking flag</span> | ||
slot is true, <var>el</var>'s <span data-x="concept-script-type">type</span> is | ||
"<code data-x="">classic</code>", and <var>el</var> does not have an | ||
<code data-x="attr-script-async">async</code> or <code data-x="attr-script-defer">defer</code> | ||
attribute.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, why not allow set it when the conditions are correct? Or does this mean that if once of these things changes, its render-blocking status also changes?
As per discussion in #10145.
(See WHATWG Working Mode: Changes for more details.)
💥 Error: Wattsi server error 💥
PR Preview failed to build. (Last tried on Mar 20, 2024, 12:30 PM UTC).
More
PR Preview relies on a number of web services to run. There seems to be an issue with the following one:
🚨 Wattsi Server - Wattsi Server is the web service used to build the WHATWG HTML spec.
🔗 Related URL
If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.