webidl icon indicating copy to clipboard operation
webidl copied to clipboard

DOMException needs Exposed=*

Open bathos opened this issue 2 years ago • 2 comments

Currently DOMException’s exposure set is (Window, Worker). However there are interfaces whose exposure sets are * which define operations that can throw DOMExceptions:

Likewise there are constructs found in global contexts not included in the (Window, Worker) exposure set with steps that specify throwing DOMExceptions, e.g. PaintWorkletGlobalScope.prototype.registerPaint.

Curious aside: I checked what Chromium’s current implementation of PaintWorkletGlobalScope does in practice and found that it did throw a DOMException there as advertised yet did not expose DOMException as a global. The surprise was that most interfaces that are allegedly universal weren’t present there, either, so it’s currently an odd little world where ReadableStreamDefaultController is at-the-ready but not, say, URL.

bathos avatar Apr 30 '22 20:04 bathos

cc @Ms2ger @domenic

annevk avatar May 02 '22 06:05 annevk

Good point, oversight on my side. PRd as #1137.

Ms2ger avatar May 02 '22 07:05 Ms2ger