Skip to content

Trusted Types: ServiceWorkerContainer.register()#42362

Merged
wbamberg merged 2 commits intomdn:mainfrom
hamishwillee:ff147_tt_serviceworkercontainer_register
Jan 6, 2026
Merged

Trusted Types: ServiceWorkerContainer.register()#42362
wbamberg merged 2 commits intomdn:mainfrom
hamishwillee:ff147_tt_serviceworkercontainer_register

Conversation

@hamishwillee
Copy link
Collaborator

ServiceWorkerContainer.register() takes a scriptURL defining the service worker. This updates the docs to reflect that the scriptURL can be a trusted type.

As per our pattern, this adds a top header and a security considerations section. To make that "work" I pushed most of the original top level overview down into a Description section.
I also added just the first example showing how to use TT.

Related docs work can be tracked in:

@hamishwillee hamishwillee requested a review from a team as a code owner December 12, 2025 03:57
@hamishwillee hamishwillee requested review from wbamberg and removed request for a team December 12, 2025 03:57
@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Dec 12, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 12, 2025

Preview URLs

(comment last updated: 2026-01-06 07:17:28)

Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

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

Only tiny comments here.

Co-authored-by: wbamberg <will@bootbonnet.ca>
@hamishwillee hamishwillee requested a review from wbamberg January 6, 2026 07:16
@hamishwillee
Copy link
Collaborator Author

Thanks @wbamberg - I've accepted those changes.

Copy link
Collaborator

@wbamberg wbamberg 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!

@wbamberg wbamberg merged commit 7cee13e into mdn:main Jan 6, 2026
7 checks passed
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants