04:03
<sideshowbarker>
looking at https://github.com/mdn/content/issues/15129 — when setTimeout(handler, timeout, ...arguments) is called with a timeout that’s not a number, what spec defines how it gets coerced into a number?
04:04
<sideshowbarker>
https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timer-initialisation-steps says nothing about coercing timeout to a number but instead assumes it’s already a number
04:29
<sideshowbarker>
I guess somehow I end up at https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
06:56
<arai>
https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin says the definition is long setTimeout(TimerHandler handler, optional long timeout = 0, any... arguments);
06:57
<arai>
so, the conversion defined in https://webidl.spec.whatwg.org/#es-long happens
09:27
<sideshowbarker>

OK, so then for a string like "1 second", I think ultimately that:

  1. calls into the ES spec at https://tc39.es/ecma262/multipage/abstract-operations.html#sec-stringtonumber, which then:
  2. calls into https://tc39.es/ecma262/multipage/ecmascript-language-source-code.html#sec-parsetext with ParseText(text, StringNumericLiteral) — which for a string like "1 second" fails to be parsed as a StringNumericLiteral, and instead returns a List of errors, and so then:
  3. we reach step 3 at https://tc39.es/ecma262/multipage/abstract-operations.html#sec-stringtonumber, “If literal is a List of errors, return NaN.“
  4. we go back to https://webidl.spec.whatwg.org/#abstract-opdef-converttoint and hit step 8, “If x is NaN, +0, +∞, or −∞, then return +0“

Does that sound right?

09:33
<arai>
let me check
09:37
<arai>
yes, that sounds right
09:37
<sideshowbarker>
OK, thanks much
10:30
<Andreu Botella>
I'm the kind of person who had noticed months ago that nested worker termination when the parent worker closes is wonky in the spec, but put it off as "not that important" months ago... but got nerd-sniped into opening that bug right now in order to justify a minor point in a different issue
10:30
<Andreu Botella>
https://github.com/whatwg/html/issues/7840
12:19
<Jake Archibald>
Does anyone know the history of DOMContentLoaded, as in, why is it named using a different pattern to other events?
12:23
<Jake Archibald>
I guess the pattern started with mutation events in DOM-level-2
12:48
<annevk>
Jake Archibald: yeah, there was a group of people that thought we should prefix and case event names in that manner, see also DOMFocusIn and the like
12:49
<annevk>
Jake Archibald: I suspect it had strong overlap with the Java people, but I don't know for sure, predates me
13:03
<Jake Archibald>
ta!
22:19
<sideshowbarker>
TabAtkins: In MDN, for https://drafts.csswg.org/css-scroll-snap/ we now have a bunch of links with broken fragments.
22:20
<sideshowbarker>
So I notice that, e.g., the anchor at https://drafts.csswg.org/css-scroll-snap/#scroll-padding no longer exists. But I see it at https://drafts.csswg.org/css-scroll-snap-1/#scroll-padding. So I guess the cause must be that the https://drafts.csswg.org/css-scroll-snap/ alias was recently changed to point to the https://drafts.csswg.org/css-scroll-snap-2 spec rather than the https://drafts.csswg.org/css-scroll-snap-1/ spec.
22:21
<sideshowbarker>
I don’t understand why the Level 2 spec doesn’t have those same parts from the Level 1 spec. Is the Level 2 spec a delta spec or something?
22:22
<sideshowbarker>
At MDN we have a policy of using the level-less URLs for all https://drafts.csswg.org/ specs (or really, for leveled specs in general)
22:25
<sideshowbarker>
…except in cases (like this one, I guess) where the leveled version which a level-less URL points to lacks some parts/anchors for features documented in MDN that are in some (earlier or later) leveled version
22:30
<sideshowbarker>
So I could fix the broken-fragments problem in this case by updating MDN to use the Level 1, e.g., https://drafts.csswg.org/css-scroll-snap-1/#scroll-padding URLs, but there’s a lot of them that broke — about 25. And I guess that means there are at least 25 features that are in the Level 1 spec that are missing from the Level 2 spec — which kind of makes me wonder why the https://drafts.csswg.org/css-scroll-snap/ alias was changed to point to the Level 2 spec.
22:31
<sideshowbarker>
TabAtkins: So I wonder if maybe the https://drafts.csswg.org/css-scroll-snap/ alias could be changed back to pointing to the Level 1 spec rather than the Level 2 spec?
22:43
<TabAtkins>
Yup it should be, I've just adjusted it
22:43
<TabAtkins>
Thanks for the catch
22:44
<TabAtkins>
(we shouldn't be pointing the unleveled aliases at delta specs, please report if you catch us doing that)
23:32
<sideshowbarker>
TabAtkins: cheers — thanks much
23:34
<sideshowbarker>
(we shouldn't be pointing the unleveled aliases at delta specs, please report if you catch us doing that)
will do — pretty sure that for now was the only current one (otherwise my mdn-spec-links build automation would catch it, which is what happened in this case), but definitely will give a heads-up if/when I never run into another one