Skip to content

TrustedTypes: Range.createContextualFragment()#42493

Merged
hamishwillee merged 2 commits intomdn:mainfrom
hamishwillee:tt_range_createdcontextualfragment
Dec 22, 2025
Merged

TrustedTypes: Range.createContextualFragment()#42493
hamishwillee merged 2 commits intomdn:mainfrom
hamishwillee:tt_range_createdcontextualfragment

Conversation

@hamishwillee
Copy link
Copy Markdown
Collaborator

The Range.createContextualFragment() creates a DocumentFragment that can subsequently be injected into the DOM. This change explains how to use it with TT.

It follows the same model as the other TrustedHTML examples.

Related work can be tracked in #41507 and #37518

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

github-actions Bot commented Dec 22, 2025

Preview URLs

(comment last updated: 2025-12-22 09:57:38)

Comment thread files/en-us/web/api/range/createcontextualfragment/index.md Outdated
Comment thread files/en-us/web/api/range/createcontextualfragment/index.md Outdated
Co-authored-by: sideshowbarker <mike@w3.org>
@hamishwillee
Copy link
Copy Markdown
Collaborator Author

Thanks for the review @sideshowbarker . Merry Xmas to you and yours.

@hamishwillee hamishwillee merged commit c72602c into mdn:main Dec 22, 2025
7 checks passed
wbamberg added a commit to wbamberg/content that referenced this pull request Dec 24, 2025
…skeys-guide

* origin/add-passkeys-guide:
  Clarify fetch() error handling behavior for Response (mdn#42497)
  Add code example to Closure glossary entry (mdn#42477)
  42252 add new relative units ff release (mdn#42470)
  Remove duplicated word (mdn#42496)
  42252 add new relative units (mdn#42469)
  TrustedTypes: Range.createContextualFragment() (mdn#42493)
  Fix CSS, HTML, and HTTP landing pages to match sidebar content and order (mdn#42460)
  TT: CSP trusted types/require-trusted... fixes (mdn#42461)
  Improve console output formatting in Recursion glossary (mdn#42478)
  Add Sec-CH-Width + consistency fixes (mdn#42453)
  webextensions/manifest.json/options_page: typo (mdn#42394)
  webextensions/api/tabs/onupdated: Fix section link (mdn#42393)
  fix: add missing closing parenthesis (mdn#42482)
  docs: mark srcData as required in bufferSubData (mdn#42483)
  docs(learn): remove invalid type attribute from video example (mdn#42479)
  Drop 'read-only' from role (mdn#42474)
  Fix: Update bufferSubData parameters to match WebGL 1 spec mdn#42315 (mdn#42411)
  chore: Replace links with `cssxref` macro in the learn area (mdn#42446)
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