Skip to content

Conversation

hamishwillee
Copy link
Collaborator

@hamishwillee hamishwillee commented Oct 6, 2025

This updates the TrustedScript documentation for Window/setInterval() to include information about using it with trusted types.

A lot of this was to update the doc to current template - such as moving Usage notes under description and so on.
I also thought it worthwhile to purge mention of getting things to work with IE, and focus on how you get the "this" right rather than not being able to get it right on legacy JavaScript.

The security considerations mostly mention CSP since generally the code option is disabled by default.

I will look at setTimeout() after this, since the changes would be mostly the same.

Project tracking in #37518

@hamishwillee hamishwillee requested a review from wbamberg October 6, 2025 05:38
@hamishwillee hamishwillee requested a review from a team as a code owner October 6, 2025 05:38
@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Oct 6, 2025
@sideshowbarker sideshowbarker removed the request for review from a team October 7, 2025 04:52
Copy link
Contributor

github-actions bot commented Oct 10, 2025

Preview URLs

(comment last updated: 2025-10-12 23:52:31)

@hamishwillee hamishwillee force-pushed the tt_window_setinterval branch from 7b8d70f to 47af7b8 Compare October 12, 2025 23:46

## Examples

### Example 1: Basic syntax
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note, I didn't add a trusted type example because to my mind it isn't the main use case with this. I can add one if you think it useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

1 participant