08:47
<Domenic>

No action needed for some time, but here are some musings on how to specify ErrorEvent's filename, lineno, colno, and cross-origin muting behavior better in the future: https://github.com/whatwg/html/issues/958#issuecomment-2182299223

Summary: every throw completion should store the active ScriptOrModule + relevant ParseNode. (Either directly in the JS spec, or via a host hook.) And we'd need some way of translating ParseNode into lineno + colno, which I don't think there's any spec machinery for right now.

08:48
<littledan>

No action needed for some time, but here are some musings on how to specify ErrorEvent's filename, lineno, colno, and cross-origin muting behavior better in the future: https://github.com/whatwg/html/issues/958#issuecomment-2182299223

Summary: every throw completion should store the active ScriptOrModule + relevant ParseNode. (Either directly in the JS spec, or via a host hook.) And we'd need some way of translating ParseNode into lineno + colno, which I don't think there's any spec machinery for right now.

Any chance we could, in the future, store the current AsyncContext.Snapshot at this point?
08:50
<Domenic>
If that'd be useful by whatever's consuming the end result, for sure. Do you have thoughts on exposing that on ErrorEvent?
08:52
<littledan>
Right, either that or just automatically running the event within that snapshot (initially leaning towards the latter, now considering the former)
08:53
<littledan>
https://github.com/tc39/proposal-async-context/issues/90
08:53
<littledan>
and the same for unhandled rejections
08:53
<Domenic>
Nice, that might be motivation for doing some of this work sooner rather than later, then.
08:54
<Domenic>
Or at least provide a path to follow if we ever do get around to cleaning up the ErrorEvent spec to the degree I'm talking about.
08:55
<littledan>
is there some cross-browser difference in when these properties are assigned? (allocation vs throw time)
08:56
<littledan>
also re muting: now that we're standardizing ignoreList in TC39-TG4 (source maps), we might want to say something about how that relates to other parts of black boxing
08:56
<littledan>
for example we might want ignoreList2 which does full black boxing (apparently Mozilla initially implemented it this way, probably because we didn't have specs for anything)
08:57
<Domenic>
There are definitely differences in muting. There are also reportedly differences in pre- vs. post-redirect URLs for filename. Not sure about allocation vs. throw time but I kind of remember that also being different, hmm.
08:57
<littledan>
sounds like fun, I'm glad you're working on that!
08:58
<Domenic>
Ehhhh am I though...
08:59
<littledan>
if you're not, then maybe we can recruit others here to try to help
08:59
<littledan>
(e.g., from the source map or AsyncContext groups)
09:01
<Domenic>
A coworker (Jeremy) is doing some spec cleanup work as part of a rotation, and I got sniped into spending Friday evening musing about this stuff, so I dropped some ideas into the thread for the future :). Any help would definitely be appreciated.