Skip to content

Trusted Types: ServiceWorkerContainer.register() - #42362

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

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

Conversation

@hamishwillee

Copy link
Copy Markdown
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

github-actions Bot commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Preview URLs

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

@wbamberg wbamberg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Only tiny comments here.

Comment thread files/en-us/web/api/serviceworkercontainer/register/index.md Outdated
Comment thread files/en-us/web/api/serviceworkercontainer/register/index.md Outdated
Comment thread files/en-us/web/api/serviceworkercontainer/register/index.md Outdated
Co-authored-by: wbamberg <will@bootbonnet.ca>
@hamishwillee
hamishwillee requested a review from wbamberg January 6, 2026 07:16
@hamishwillee

Copy link
Copy Markdown
Collaborator Author

Thanks @wbamberg - I've accepted those changes.

@wbamberg wbamberg left a comment

Copy link
Copy Markdown
Collaborator

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.

3 participants