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

Chainable modifiers? #242

Closed
otherdaniel opened this issue Nov 26, 2024 · 1 comment
Closed

Chainable modifiers? #242

otherdaniel opened this issue Nov 26, 2024 · 1 comment

Comments

@otherdaniel
Copy link
Collaborator

This came up when editing the "modify-able config" PR, #237: Should the modifier methods return a reference to [=this=], so that you can 'chain' methods?

sanitizer.allowElement("a").allowElement("span");

A precedent might be JavaScript Set type

@annevk
Copy link
Collaborator

annevk commented Nov 26, 2024

The web platform doesn't do this. We reserve return values in case we might want to return something useful at some point.

See w3ctag/design-principles#286.

@mozfreddyb mozfreddyb closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants