This repository was archived by the owner on Jan 13, 2025. It is now read-only.
Commit cbd9358
fix(snackbar): address Trusted Types violation
Assigning a string directly to the innerHTML property is potentially security sensitive, and thus causes a Trusted Types violation. This blocks apps using mdc-snackbar from adopting Trusted Types.
Refactor the innerHTML assignment to the equivalent construction using native DOM APIs which is compatible with Trusted Types.
This was tested on JAWS 2022/Chrome 99, verifying that screen reading behaviour was equivalent before and after this change.
PiperOrigin-RevId: 4357543451 parent ae8a6a3 commit cbd9358
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
0 commit comments