content icon indicating copy to clipboard operation
content copied to clipboard

Elements with blocking=render have to be in the <head>

Open eeeps opened this issue 9 months ago • 0 comments

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement/blocking

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

On these pages: https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement/blocking https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/blocking https://developer.mozilla.org/en-US/docs/Web/API/HTMLStyleElement/blocking https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script#blocking https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/link#blocking https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/style#blocking

...the fact that render-blocking elements have to appear in the <head> is not mentioned. This caught me out but the spec author (Noam Rosenthal) helped me out and asked me to file an MDN issue: https://bsky.app/profile/nomster.bsky.social/post/3lpwpn6ezgc2v

What did you expect to see?

Information about the requirement that blocking=render only works on elements in the <head>

Do you have any supporting links, references, or citations?

https://bsky.app/profile/nomster.bsky.social/post/3lpwpn6ezgc2v https://html.spec.whatwg.org/multipage/dom.html#allows-adding-render-blocking-elements

Do you have anything more you want to share?

No response

eeeps avatar May 24 '25 22:05 eeeps