Skip to content

Conversation

hamishwillee
Copy link
Contributor

On HTMLScriptElement you can access the innerText and textContent properties. We had documented these as inherited, but in fact they are duplicated and have their own IDL https://w3c.github.io/trusted-types/dist/spec/#dom-htmlscriptelement-innertext

This change makes that more clear, and makes the data more usable.

I'll be adding new docs for these too.

Related work can be tracked in mdn/content#37518

@github-actions github-actions bot added data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API size:l [PR only] 101-1000 LoC changed labels Sep 15, 2025
Copy link
Contributor

github-actions bot commented Sep 15, 2025

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

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

We would still need a enforces_trusted_types subfeature under api.HTMLScriptElement.{innerText,textContent}.

@hamishwillee
Copy link
Contributor Author

@caugner Thanks. Updated as you suggested.

@caugner caugner changed the title HTMLScriptElement TT updates Move Trusted Types subfeatures into HTMLScriptElement Sep 19, 2025
@caugner caugner merged commit 0df6d5d into mdn:main Sep 19, 2025
6 checks passed
@mdn-bot mdn-bot mentioned this pull request Sep 19, 2025
@hamishwillee hamishwillee deleted the script_element_tt branch September 21, 2025 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API size:l [PR only] 101-1000 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants