Describe the bug
@shgysk8zer0 Example Code in ReadMe document is mismatch with latest specification of sanitizer option, which is a named field in an object instead of an independent argument:
import { elements, attributes } from '@aegisjsproject/sanitizer/config/html.js';
const sanitizer = {
elements: ['hello-world', ...elements],
attributes: ['foo', ...attributes],
};
document.querySelector('.container').setHTML(`
<hello-world foo="bar"></hello-world>
`, sanitizer);
Expected behavior
https://wicg.github.io/sanitizer-api/#configobject
import { elements, attributes } from '@aegisjsproject/sanitizer/config/html.js';
const sanitizer = {
elements: ['hello-world', ...elements],
attributes: ['foo', ...attributes],
};
document.querySelector('.container').setHTML(`
<hello-world foo="bar"></hello-world>
`, { sanitizer });
// 👆 changed here
Describe the bug
@shgysk8zer0 Example Code in ReadMe document is mismatch with latest specification of
sanitizeroption, which is a named field in an object instead of an independent argument:Expected behavior
https://wicg.github.io/sanitizer-api/#configobject