-
Notifications
You must be signed in to change notification settings - Fork 31
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
Introspection of Sanitizer configs (and default config). #80
Conversation
dfc0d886f2a6ef32b074f0e81689f296891e06a9 git squash commit for introspection. a9bad05925e88419d5cf5dd43a0514d262090fcf wip 4f71d76d8c43898cd2685e0cb4086b4074f787b3 wip 34fe037326dbb851132cc65462fa41a6acd57e06 Continue. Dictionaries can't be attributes.
index.bs
Outdated
|
||
// We found a Sanitizer instance. Does it have an allow-list configured? | ||
const a_sanitizer = ...; | ||
!!a_sanitizer.config().allowElements // true, iff an allowElements list is configured |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I'd spell "iff" out (or just use "if") :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
as its [=configuration object=]. | ||
* The <dfn method for=Sanitizer><code>sanitize(<var>input</var>)</code></dfn> | ||
method steps are to return the result of running the [=sanitize=] | ||
algorithm on |input|, | ||
* The <dfn method for=Sanitizer><code>sanitizeToString(<var>input</var>)</code></dfn> | ||
method steps are to return the result of running [=sanitizeToString=] | ||
algorithm on |input|. | ||
* The <dfn method for=Sanitizer><code>config()</code></dfn> method steps are | ||
to return the result of running the [=query the sanitizer config=] | ||
algorithm. It essentially returns a copy of the Sanitizer's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this sentence be marked as non normative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I solved this by removing the sentence, and instead adding an example which compares the two. That way, normativity is clear, and we gain a free example. :-)
Ref: WICG/sanitizer-api#80 Bug: 1202655 Change-Id: I743cedadab7e89bcce6b8248fd299a70c8164c52 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2874605 Commit-Queue: Daniel Vogelheim <[email protected]> Reviewed-by: Yifan Luo <[email protected]> Cr-Commit-Position: refs/heads/master@{#879407} NOKEYCHECK=True GitOrigin-RevId: 31650c7aae8745e581fc625e93f3bdaa73b8753f
New feature: Allow introspection of Sanitizers' configuration. (#77)