Hacker News new | ask | show | jobs
by cheeaun 238 days ago
Found a polyfill here https://github.com/mozilla/sanitizer-polyfill
1 comments

This just uses DOMPurify under the hood
...yes, that's what a polyfill is: a javascript implementation of a new spec that's only applied when the current browser doesn't yet support the new spec. This lets devs start using it right away, then when it has enough support across browsers the polyfill can be removed without changing their code.