-
Notifications
You must be signed in to change notification settings - Fork 58
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
renderPriority element attribute #676
Comments
The arguments for preferring a HTML attribute for this seem pretty weak so far, WICG/display-locking#200 (comment). (Perhaps there are other unspoken arguments)? |
I left some more thoughts on that issue, but I would definitely appreciate TAG's view on it |
Will there be a way to set a default for this, say for a custom element? |
How does this work with nesting? E.g. if I have an ancestor with Wouldn't that also enable advertisers from just injecting HTML with I would also have liked a discussion on what kind of performance gain would this enable, for a sufficiently complex DOM (e.g. the HTML spec). Are we increasing the complexity of the web platform to save some nanoseconds or is it a more significant gain?
How would an author use |
Thank you for you feedback and questions!
We don't have plans to expose a way to set a default behaviour. One of the alternatives that @andruud suggested is to use a CSS property instead of an Element attribute. This would allow you to target more than one element, effectively setting a default behaviour. As the issue talks about, I'd like to get TAG guidance on whether the attribute or property is more appropriate here.
I've had some thoughts on a similar case here: WICG/display-locking#200 (comment)
I can add a section to the explainer to try and foster such a discussion. Just from dealing with content-visibility content, I can say that it saves anywhere on the order from milliseconds to seconds of load time. The way this is set up though is that the work is deferred until it is needed. With appropriately chunked content, With this proposed feature, the developer can set
The developer would display the content (i.e. removing |
Thank you for the explanation. Saving milliseconds to several seconds certainly sounds worthwhile to me.
Given that the default renderpriority is |
Hmm, the default value is
The question is, of course, if it has no effect on the element, does it still affect the nested |
Hi @vmpstr - we're just reviewing progress on this today and it looks like so far the explainer hasn't been updated. Do you you have any additional status you can share? |
Hey, I apologize for the delay. I've just updated the explainer as a result of the discussions that we had on this issue. Thank you! |
Hi @vmpstr, @cynthia and I discussed this again today in a breakout today. We are still not sure about certain details of the proposed algorithm, including my question from above about nesting higher priority elements inside lower priority elements. We would like to see some examples of actually using the feature to target the user needs you are targeting. Are all these values necessary to address these use cases? |
Thank you for your feedback and questions!
That makes sense, thanks.
The intent is to have this property be treated as a maximum rendering priority for itself and its descendants. This would mean that higher priority descendants would still be limited by the lower priority ancestors. In other words, a parent with a background priority will cause all of its children to update with at most a background priority, even if one of its children is a user-blocking priority.
I don't have any working examples since we don't have a working prototype of this feature, but I can work to construct hypothetical examples where this would be useful. Thanks again! |
closing for now based on @chrishtr - can be re-opened when appropriate |
Hello TAG!
I'm requesting a TAG review of renderPriority element attribute.
The renderPriority attribute is an HTML attribute that informs the User Agent to keep the element's rendering state updated with a specified priority. This is used on elements whose rendering state would not otherwise be kept up-to-date.
Further details:
We'd prefer the TAG provide feedback as (please delete all but the desired option):
💬 leave review feedback as a comment in this issue and @-notify @vmpstr
The text was updated successfully, but these errors were encountered: