- From: Yoshiya Hinosawa <notifications@github.com>
- Date: Fri, 15 Jan 2021 01:43:03 -0800
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 15 January 2021 09:43:16 UTC
> DOMException.DOMSTRING_SIZE_ERR returns 2 for me in Firefox. That's right, but this PR doesn't suggest removing that constant. What the table (2.8.1.) defines is the mapping from the error name to error code. e.g. `new DOMException('foo', 'DOMStringSizeError').code` should be 2 (=== DOMException.DOMSTRING_SIZE_ERR) according to the table, but `new DOMException('foo', 'DOMStringSizeError').code` is actually 0 in all 4 major browsers. I checked these mappings (of deprecated ones) by the following expression: ```js [ new DOMException('foo', 'IndexSizeError').code, new DOMException('foo', 'DOMStringSizeError').code, new DOMException('foo', 'ValidationError').code, new DOMException('foo', 'InvalidAccessError').code, new DOMException('foo', 'NoDataAllowedError').code, new DOMException('foo', 'TypeMismatchError').code ] ``` The major 4 browsers all returns `[ 1, 0, 0, 15, 0, 17 ]`, which means they don't implement mapping of `DOMStringSizeError` => 2, `ValidationError` => 6, `NoDataAllowedError` => 16. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/heycam/webidl/pull/946#issuecomment-760786452
Received on Friday, 15 January 2021 09:43:16 UTC