12:00
<sideshowbarker>
I see the “Change Array by copy“ proposal https://tc39.es/proposal-change-array-by-copy/ seems to have been implemented (and shipped?) in Firefox — https://bugzilla.mozilla.org/show_bug.cgi?id=1729563. Has it been implemented in any other browser engines yet?
12:09
<Ashley Claymore>
I think it is still behind a compile time flag in Firefox. It has started to ship in Safari tech preview. But the spec has changed (and could change again) since it was implemented there
12:13
<sideshowbarker>
OK, thanks — then I’m going to suggest we close https://github.com/mdn/content/pull/9940 for now — rather than keeping it open indefinitely — and revisit it if/when things level out later. That PR’s been hanging open for more than 7 months now, and in general I don’t think it’s so great to keep PRs open that long.
12:30
<nicolo-ribaudo>

I'm reading the HostResolveImportedModule description (https://tc39.es/ecma262/#sec-hostresolveimportedmodule), and I'm confused about what happens when referencingScriptOrModule is null.

If I have two iframes containing <button type="button" onclick="import('./foo.mjs')">Click me</button>, does import('./foo.mjs') have to return the same module instantiation both times (third bullet point) and thus leak an iframe's Realm to the other?

12:32
<littledan>
the referencing script or module is more about fetch options or the base URL/referrer; it doesn't control which realm things happen in
12:33
<nicolo-ribaudo>
But if it's the same referencing script/module both times (and in this case it's both times null), they cannot be executed in two different realms (because it can only be executed once)
12:37
<littledan>
How so? Are you referencing the HTML spec in your analysis, or is this based on JS more generally?
12:38
<nicolo-ribaudo>
I'm just reading the requirements and note of https://tc39.es/ecma262/#sec-hostresolveimportedmodule in ecma262
12:39
<littledan>
it seems totally possible that we need to add more requirements or change the existing one. I have trouble making sense of the module import hooks without referencing HTML concretely, tbh
12:40
<nicolo-ribaudo>
I'll check the HTML spec to see what it does
12:41
<littledan>
just curious, are you looking into this in relation to the current ShadowRealm controversy about using a null referrer?
12:41
<nicolo-ribaudo>
Nope, I was reading it to understand how to properly describe module blocks caching
12:42
<littledan>
interesting, hopefully the referrer doesn't matter much in that case!
12:42
<littledan>
we might have an HTML PR for that feature, or maybe we didn't get around to it, I don't remember
12:42
<nicolo-ribaudo>
Agree! But I wanted to fully understand how caching is speified
12:48
<nicolo-ribaudo>
Ok, I believe that HTML violates the requirements for that host hook, but HTML does the only sensible thing and we should relax the requirement in 262. I'll open an issue with a proper description of what I think we currently do and what we should do.
12:50
<nicolo-ribaudo>
(or maybe I'm just wrong, and I'll relize it when writing it down 😂)
17:04
<nicolo-ribaudo>
littledan FYI, the issue is https://github.com/tc39/ecma262/issues/2803