You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Ah, I had only thought about the case of an engine implementing this proposal vs not implementing this proposal. I didn't think through progressive enhancement for the case of future builtin proposals.
I agree that not validating the builtin set names would make progressive enhancement simpler. I can't think of any downsides right now, so it seems like a good improvement to make.
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
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.
The text was updated successfully, but these errors were encountered: