webcomponents / polyfills

Web Components Polyfills
BSD 3-Clause "New" or "Revised" License
1.13k stars 165 forks source link

Make `webcomponents-loader.js` compatible with the Trusted Types API #501

Closed bicknellr closed 2 years ago

bicknellr commented 2 years ago

Fixes https://github.com/Polymer/internal/issues/1272

bicknellr commented 2 years ago

Local WCT tests passed as expected, since no trusted types policy is being enforced yet: https://github.com/webcomponents/polyfills/runs/5763342598?check_suite_focus=true#step:7:24

bicknellr commented 2 years ago

Hmm, I was expecting the last commit to start enforcing trusted types and cause the test to fail, but they passed: https://github.com/webcomponents/polyfills/runs/5763527250?check_suite_focus=true#step:7:24

bicknellr commented 2 years ago

That test is now failing with a timeout, as expected: https://github.com/webcomponents/polyfills/runs/5763712982?check_suite_focus=true#step:7:24

bicknellr commented 2 years ago

After adding the new policy, the tests pass again: https://github.com/webcomponents/polyfills/runs/5763782787?check_suite_focus=true#step:7:24

bicknellr commented 2 years ago

This is passing locally and in internal test runs so I'm going to merge despite the test infra problems.