Insufficient feature detection in Chrome 105 Beta
#156 opened on Aug 24, 2022
Repository metrics
- Stars
- (76 stars)
- PR merge metrics
- (PR metrics pending)
Description
Currently Chrome 105 Beta ships with a basic implmentation of the Sanitizer API, but keeps the .sanitize and .sanitizeFor methods hidden behind the enable-experimental-web-platform-features flag.
https://chromestatus.com/feature/5786893650231296
If this flag is not enabled the window.Sanitizer constructor exists, but the object it creates does not have the .sanatize and .sanitizeFor methods. The polyfill currently only checks if window.Sanitizer is a function to decide if it needs to polyfill the API. This means that in Chrome 105 Beta the polyfill is not applied and the .sanitize and .sanitizeFor are missing. Should the final Chrome 105 version ship like this a more complex feature detection is needed.
EDIT: Spell "sanitize" correctly :)