Skip to content
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

♻️🐛 [Trusted Types] Make createExtensionScript Trusted Types compatible #5

Merged

Conversation

youssef-attia
Copy link
Collaborator

This change updates AMP's createExtensionScript function to be Trusted Types compatible, partial fix to ampproject#37297. The function was directly setting the scriptElement.src to some variable url. This url is expected to fall under the cdn so we can restrict the host the url takes on to cdn.ampproject.org and return the url as being a TrustedScriptUrl.

Copy link
Owner

@eozmen410 eozmen410 left a comment

Choose a reason for hiding this comment

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

Thank you!

Approving again since this was previously merged in #2.

@eozmen410 eozmen410 merged commit 87064b0 into eozmen410:tt_extension_script Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants