03:13
<MikeSmith>
hober: see comment at https://github.com/mdn/browser-compat-data/issues/5657#issuecomment-591376504
03:14
<MikeSmith>
> Of course, all this would be easier if Apple/WebKit would support BCD with updates, much like Google, Microsoft, or Samsung do for their products here.
03:15
<MikeSmith>
meaning, it would be great if there were somebody from the Safari team who make updates to the browser-version-support data for Safari for features in https://github.com/mdn/browser-compat-data each time there’s a Safari release
11:44
<Loilo>
hey folks :) I've stumbled across a pretty interesting case today and reading the spec hasn't helped me so far, so maybe you could help me out here. <3 so...does anybody know why `Number(document.createElement('a'))` yields `0`, but every other element (or even an anchor element which has an `href`) seems to return `isNaN`?
12:01
<gsnedders>
Loilo: because, uh, toPrimitive(_, hint: number) calls .valueOf then .toString
12:01
<gsnedders>
Loilo: HTMLHyperlinkElementUtils defines a stringifier which returns obj.href, which in that case is ""
12:02
<gsnedders>
empty string converted to a number is +0, therefore you get 0
12:11
<Loilo>
aww... I've read through ecma-262 to see how ToPrimitive works in the first place, but I just realized I read the spec for ES 5.1 which was way less comprehensive about that subject... had I read the es2019 spec, I may have figured this out myself ._. thanks a lot!
12:12
<gsnedders>
Loilo: this hasn't changed since… at least ES3, don't know about earlier ES specs!
12:13
<gsnedders>
Loilo: ES5.1 definitely defines this behaviour
12:15
<andreubotella>
Loilo: For what browsers actually implement, you might want to check out the ES version in progress at the time
12:15
<Loilo>
the ES5.1 spec points to some internal [[DefaultValue]] for objects. it also pointed to how [[DefaultValue]] works for "native ECMAScript objects" (which I'm not sure about to what it applies)
12:15
<andreubotella>
that is, not es2019 but 2020
12:16
<andreubotella>
though I don't think the primitive stuff changes
12:16
<Loilo>
yeah I didn't assume that either, would be extremly unusual
12:17
<Loilo>
but I thought maybe DOM elements are not part of what the spec refers to as "native ECMAScript objects" and therefore have a different algorithm for determining their [[DefaultValue]]
12:19
<andreubotella>
The 2020 spec doesn't use that term, but it sounds like it's referring to anything that's not exotic objects.
12:19
<Loilo>
going to need to look up "exotic objects" :)
12:20
<gsnedders>
yeah, what andreubotella said
12:20
<andreubotella>
and I don't think objects implementing DOM interfaces count as exotic objects, but I don't know the WebIDL spec well enough
12:20
<gsnedders>
this has changed more than I remembered (:
12:20
<gsnedders>
andreubotella: so there's different subtlies here, really
12:21
<gsnedders>
DOM objects are what ES5 calls "host objects" and not "native ES objects"
12:22
<Loilo>
okay thanks for alle the pointers :) I just realized my error in reasoning was not actually about how the ES spec reads ([[DefaultValue]] in ES5.1 seems to be what is described as OrdinaryToPrimitive in ES2020) but that I overlooked what HTMLHyperlinkElementUtils has to say on the topic
12:22
<Loilo>
thanks again both of you! :)
12:53
<MikeSmith>
maybe time for somebody to push the Lock Conversation button on https://github.com/whatwg/dom/issues/510
13:32
<yhirano>
annevk: I'd appreciate if you could take a look at https://github.com/mikewest/corpp/pull/9, https://github.com/mikewest/corpp/pull/10 and https://github.com/mikewest/corpp/pull/11.
19:22
<MikeSmith>
does navigator.mediaDevices returning undefined in mobile browsers ring a bell with anyone?
19:22
<MikeSmith>
(on Android, both in Chrome and Firefox)