Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

Add Trusted Types#26

Merged
rzhade3 merged 7 commits into
github:mainfrom
rzhade3:main
Dec 9, 2022
Merged

Add Trusted Types#26
rzhade3 merged 7 commits into
github:mainfrom
rzhade3:main

Conversation

@rzhade3

@rzhade3 rzhade3 commented Dec 8, 2022

Copy link
Copy Markdown
Contributor

This PR adds support for Trusted Types to this library.

Similar to github/include-fragment-element#81, this PR adds a concept of a TrustedTypesPolicy that will be respected by all .innerHtml calls if it has been set.

This PR is still WIP, as we need to add tests, but we'd appreciate any 💭 on the approaches that we've taken thus far.

rzhade3 and others added 2 commits December 8, 2022 14:48
Co-authored-by: Matt Langlois <fletchto99@github.com>
Co-authored-by: Kylie Stradley <kyfast@github.com>
Co-authored-by: Jack McCracken <jackmc@github.com>
Co-authored-by: Matt Langlois <fletchto99@github.com>
Co-authored-by: Kylie Stradley <kyfast@github.com>
Co-authored-by: Jack McCracken <jackmc@github.com>
@rzhade3 rzhade3 requested a review from a team as a code owner December 8, 2022 22:49
@primer-css

Copy link
Copy Markdown

👋 Hello and thanks for pinging us! This issue or PR has been added to our inbox and a Design Infrastructure first responder will review it soon.

  • 🎨 If this is a PR that includes a visual change, please make sure to add screenshots in the description or deploy this code to a lab machine with instructions for how to test.
  • If this is a PR that includes changes to an interaction, please include a video recording in the description.
  • ⚠️ If this is urgent, please visit us in #primer on Slack and tag the first responders listed in the channel topic.
rzhade3 and others added 2 commits December 8, 2022 16:01
Co-authored-by: Lucas Garron <lgarron@github.com>
Comment thread .eslintrc.json
Comment thread src/trusted-types.ts Outdated

@keithamus keithamus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread README.md Outdated
Comment thread src/template-result.ts Outdated
Co-authored-by: Lucas Garron <lgarron@github.com>
@rzhade3 rzhade3 merged commit aa567df into github:main Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

4 participants