Re: [whatwg/webidl] Upgrade QuotaExceededError to a DOMException derived interface (PR #1465)

bakkot left a comment (whatwg/webidl#1465)

Is there a reason for the change to `.code`? I didn't catch that was part of this PR originally, and it looks like that actually did break at least some consumers ([e.g.](https://github.com/video-dev/hls.js/pull/7368)), which doesn't terribly surprise me; looking through [these results](https://github.com/search?q=lang%3Ats+OR+lang%3Ajs+%22DOMException.QUOTA_EXCEEDED_ERR%22&type=code) I expect a few other things to also break.

I had originally read the OP as suggesting this would only be different when manually doing `new DOMException` but the link above suggests that even real `QuotaExceededError` objects thrown by the platform now have a different `.code`. It would be nice if the `.code` of errors thrown by the platform didn't have to change, e.g. by having `QuotaExceededError.prototype.code === DOMException.QUOTA_EXCEEDED_ERR `.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1465#issuecomment-3047433035
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1465/c3047433035@github.com>

Received on Tuesday, 8 July 2025 05:42:13 UTC