-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
I'm wondering whether the builtin set names should be validated, as specified here:
js-string-builtins/document/js-api/index.bs
Lines 1754 to 1759 in a3c7562
| To <dfn>validate builtin set names</dfn> with |builtinSetNames|, perform the following steps: | |
| 1. If |builtinSetNames| contains any duplicates, return false. | |
| 1. [=list/iterate|For each=] |builtinSetName| of |builtinSetNames|, | |
| 1. If |builtinSetName| does not equal the name of one of the builtin sets defined in this section, return false. | |
| 1. Return false. |
An advantage is that for feature detection one doesn't even need to import a builtin operation with an incorrect signature.
But it makes progressive enhancement more complicated. The current progressive enhancement section states that it's safe for users to request builtins while still providing a polyfill for backup behavior and the optimal path will be chosen. But if we validate the builtin set names and some builtins are not supported, the validation is going to fail even when a polyfill is provided.
Metadata
Metadata
Assignees
Labels
No labels