16:02
<annevk>
domfarolino: FWIW, https://github.com/whatwg/html/pull/4048#issuecomment-451187554 sounds good, I was just wondering how it was all fitting together
16:02
<annevk>
domfarolino: the more specific pieces look good though
16:03
<domfarolino>
annevk: Cool, thanks for checking it out. Yeah, the "fitting together" pieces are sort of in limbo currently
20:25
<domfarolino>
Domenic: WRT a "script-blocking style sheet" counter on Documents for #4031, it occurred to me that when a sheet is loaded, we cannot just decrement the counter, because the decremeter needs to know whether or not the conditions to increment the counter when the loading began, were once met (i.e., a "blocking" ss was loaded).
20:28
<domfarolino>
I'm wondering if we should make the conditions under https://html.spec.whatwg.org/multipage/semantics.html#a-style-sheet-that-is-blocking-scripts something callable, so we can increment and decrement explicitly. Let me know what you think of this sketch: https://gist.github.com/domfarolino/3fa29b31800e2203c8ce12b22cf8eba9
20:29
<Domenic>
domfarolino: what about having a set, instead of just a counter? Then removing (if it's not present) is a no-op
20:29
<Domenic>
Your version seems good to though at first glance, reading in more detail now...
20:30
<domfarolino>
I don't know how my counter version^ integrates with XML style sheets at all though, since it seems their processing would have to explicitly try and increment said counter, which it does not do currently.
20:31
<domfarolino>
RE a set, I was thinking about something similar, however we can't have a set of style sheets, because as per spec, the style sheet isn't "Created" (and added simultaneously) until it is finished loading, and we want scripting to be blocked before then. That brought be back to the counter idea
20:32
<Domenic>
Set of elements?
20:32
<Domenic>
(Refreshing myself on what XML stylesheets do :-/)
20:33
<domfarolino>
Oh duh, set of elements might be nice.
20:34
<Domenic>
Or a set of "things" if we need to handle XML stylesheets/Link headers...
20:34
<Domenic>
It does seem like we'll need to have something hand-wavey for those two
20:34
<domfarolino>
Yeah I started thinking about how to handle Linke headers in the future too
20:34
<Domenic>
I'm just concerned about not regressing the current vague text into precise but incorrect text
20:34
<Domenic>
So I think we want to have precise for link + style, plus vague for Link + XMLSS
20:35
<Domenic>
So either the counter or set versions, plus a sentence that says like "when you see an XMLSS or Link header, increment the counter/add to the set; when X happens, decrement/remove from the set"
20:37
<Domenic>
Medium-term we should investigate whether browsers actually allow Link or XMLSS style sheets to block script
20:37
<domfarolino>
That makes sense, I can add that to the interactions of styling and scripting section
20:37
<Domenic>
But right now I'm just aiming for minimum work to maintain current text's normative requirements
20:38
<domfarolino>
SGTM
20:38
<Domenic>
(although as you note the current requirements are pretty iffy, e.g. "the element" is often referenced but that doesn't make sense for Link headers)
20:41
<domfarolino>
Maybe longer-term we'd want "contributes a script-blocking style sheet" to be called not with an element, but with some abstract "Link properties" obj is produced by `Link` headers, `<style>`, and `<link>` elements. Not sure yet though
20:42
<domfarolino>
But yeah for now I can go with a counter or set approach and add a sentence to sort of hand-wave over XMLSS+Headers interacting with said construct
20:42
<Domenic>
My hope is that nobody bothered to implement blocking for XMLSSs and Link headers...
20:42
<domfarolino>
That would be nice
20:43
<domfarolino>
Will check
20:44
<annevk>
We could just put those into the set no? No need to make it a set of elements per se
20:47
<domfarolino>
annevk: Could you elaborate what "those" is?
20:47
<annevk>
domfarolino: Link header and PI node
20:54
<domfarolino>
Ok, can we insert the XSLT PI nodes in via HTML spec, or would updating the XSLT spec be necessary if that’s even an option
22:11
<domfarolino>
Domenic: FWIW it appears that xml style sheets and link headers support blocking styles
22:27
<Domenic>
:(
22:44
<domfarolino>
Oddly enough Chrome won't even fetch a style sheet that appears as a `Link` header unless it is rel=preload
22:44
<domfarolino>
I guess Safari too: https://crbug.com/19237 + https://bugs.webkit.org/show_bug.cgi?id=20018
22:54
<Domenic>
Ah right, I forgot that that feature was only on Firefox
22:54
<Domenic>
I think it was annevk who uses that to make their page's CSS/JS files look pretty
22:54
<Domenic>
Or something like that
22:56
<Domenic>
(Cannot reproduce, but I swear I saw it at one time.)
22:56
<Domenic>
(Also https://annevankesteren.nl/js/global is a funny file)
22:59
<domfarolino>
Lol