Skip to content

icanhyperfocus/sanitizer-polyfill

 
 

Repository files navigation

Polyfill for the Sanitizer API specification.

The polyfill might provide a shim on top of DOMPurify, that mainly rewrites the specified configuration object into a DOMPurify configuration.

DOMPurify is more interesting than other libraries, as it relies on the current browser's HTML parsing behavior (it is built on top of the NodeIterator interface).

There's a Demo page that loads all of the polyfill scripts and then does nothing. By default, the polyfill will bail out if you already have a Sanitizer object defined. But that can be easily overridden by clicking the .

It might useful to test Element.setHTML

About

rewrite constructor arguments, call DOMPurify, profit

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%