Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitizer config introspection. #77

Closed
otherdaniel opened this issue Apr 12, 2021 · 4 comments
Closed

Sanitizer config introspection. #77

otherdaniel opened this issue Apr 12, 2021 · 4 comments
Labels
enhancement sanitizer-api issues with the API

Comments

@otherdaniel
Copy link
Collaborator

This came up during TAG review (w3ctag/design-reviews#619): "Exposing the config on Sanitizer instances (possibly read-only) could provide an easy solution for this use case. Exposing the default config as a static property on Sanitizer might be helpful too."

I think the specific question raised by TAG (how to block a specific element) can be resolved elsehow (namely by blockElements:), but I think the general question remains: Should we support query-ing any sanitizer instance's config, and/or the default config, with the primary use case being building a derived configuration.

@otherdaniel otherdaniel added enhancement sanitizer-api issues with the API labels Apr 12, 2021
@iVanlIsh
Copy link
Collaborator

I would vote for we should since it looks like a fairly convenient feature for the developers.

@mozfreddyb
Copy link
Collaborator

Yes! I think it would be really useful to expose the defaults (in the Sanitizer global) and an instance's config (through an attribute).

@otherdaniel
Copy link
Collaborator Author

Good. I've started spec-ing something; will send a PR soon-ish.

"through an attribute": WebIDL spec says attributes can't be dictinonary-valued. I don't understand why; but I've picked parameter-less methods to be safe. (Am super happy to change in case I misunderstood this.)

@otherdaniel
Copy link
Collaborator Author

Resolved (#80).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement sanitizer-api issues with the API
Projects
None yet
Development

No branches or pull requests

3 participants