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

Should the APIs for creating a TrustedScript etc return a frozen object? #535

Open
lukewarlow opened this issue Jul 11, 2024 · 1 comment
Labels
Milestone

Comments

@lukewarlow
Copy link
Member

Currently the TrustedTypes aren't frozen objects so can be overridden. And then we need to account for the fact stuff like the stringifier can be overriden in implementations. We should probably change the spec to freeze the trusted types upon creation?

I'm not sure spec wise the correct way to do this. But I'm assuming we can call a freeze algorithm with the object even if there's not an IDL way to say this?

cc @koto

@lukewarlow
Copy link
Member Author

This came up during implementation of eval protection within JSC. Where having a frozen object should help improve performance.

@lukewarlow lukewarlow added this to the v1 milestone Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant