Skip to content

Commit

Permalink
Adds Trusted Types support for reflected boolean properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
bicknellr committed Jun 1, 2022
1 parent 76e77b6 commit ce474db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/mixins/properties-changed.js
Expand Up @@ -550,7 +550,9 @@ export const PropertiesChanged = dedupingMixin(
_serializeValue(value) {
switch (typeof value) {
case 'boolean':
return value ? '' : undefined;
return value ?
(window.trustedTypes ? window.trustedTypes.emptyScript : '') :
undefined;
default:
return value != null ? value.toString() : undefined;
}
Expand Down

0 comments on commit ce474db

Please sign in to comment.