Skip to content

Conversation

@Josh-Cena
Copy link
Member

Fix #41233

@Josh-Cena Josh-Cena requested review from a team as code owners September 22, 2025 04:12
@Josh-Cena Josh-Cena requested review from bsmth, dipikabh, estelle and wbamberg and removed request for a team, dipikabh, estelle and wbamberg September 22, 2025 04:12
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:WebAPI Web API docs Content:Security Security docs system [PR only] Infrastructure and configuration for the project size/m [PR only] 51-500 LoC changed labels Sep 22, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 22, 2025

Preview URLs (7 pages)
Flaws (8)

Note! 5 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/HTMLScriptElement/text
Title: HTMLScriptElement: text property
Flaw count: 5

  • macros:
    • Can't resolve /en-US/docs/Web/API/HTMLScriptElement/textContent
    • Can't resolve /en-US/docs/Web/API/HTMLScriptElement/textContent
    • Can't resolve /en-US/docs/Web/API/HTMLScriptElement/innerText
    • Can't resolve /en-US/docs/Web/API/HTMLScriptElement/textContent
    • Can't resolve /en-US/docs/Web/API/HTMLScriptElement/innerText

URL: /en-US/docs/Web/Security/Attacks/Phishing
Title: Phishing
Flaw count: 3

  • macros:
    • Can't resolve /en-US/docs/Glossary/multi-factor_authentication
  • unknown:
    • Error serializing baseline for numeric-seperators: missing field description``
    • Error serializing baseline for single-color-gradients: missing field description``
External URLs (1)

URL: /en-US/docs/Web/Security/Attacks/Phishing
Title: Phishing

(comment last updated: 2025-09-22 14:05:13)

### `text` vs `textContent` vs `innerText`

The `text` and {{domxref("HTMLScriptElement.textContent", "textContent")}} properties of `HTMLScriptElement` are equivalent: both can be set with a string or a `TrustedScript` type and both return a string representing the content of the script element.
The `text` and {{domxref("Node.textContent", "textContent")}} properties of `HTMLScriptElement` are equivalent: both can be set with a string or a `TrustedScript` type and both return a string representing the content of the script element.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think at least some of these changes are wrong, cc @hamishwillee

Copy link
Collaborator

@hamishwillee hamishwillee Sep 22, 2025

Choose a reason for hiding this comment

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

Thanks, yes none of these changes should be made in this document.

@Josh-Cena The existing docs are correct - the properties have been added to HTMLScriptElement as well. They should be coming through from BCD soon. I still have to add docs for textContent and innerText - they are different than in the parent interfaces in that they can be assigned (and may required) TrustedTypes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, wasn't aware of it!

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd like to ask for care with changes like this. Typoes are usually clear-cut, but this isn't, and it was just chance that I happened to see the PR when I had been involved in the review last week. It would be really easy for this to slip in otherwise.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is not just a typo fix PR; I send PRs that fix broken links and broken code twice every week. This is a broken link and I wasn't aware that it's supposed to exist, because there's no BCD (had there been, it would be filtered out by virtue of being in web-docs-backlog).

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not just a typo fix PR

I do understand that, that's why I'm asking for care. It's easy for cleanup PRs to introduce errors in the docs, because often the author and the reviewer weren't involved in the original, so don't have the context.

In this case it's obvious from the next sentence that the change doesn't make sense:

The text and textContent properties of HTMLScriptElement are equivalent: both can be set with a string or a TrustedScript type and both return a string representing the content of the script element. The main difference is that textContent is also defined on Node and can be used with other elements to set their content with a string.

...but when a reviewer is looking at a cleanup PR that spans multiple different bits of the docs, that they haven't seen before, it's really easy for a busy reviewer to semi-rubberstamp it: look at a broken link, see that the PR fixes it, approve the PR.

@github-actions github-actions bot added the Content:Learn Learning area docs label Sep 22, 2025
Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

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

Thanks for fixing and undoing the trusted types change

(FWIW I would have done the same thing under time pressure. It's really only a problem because you are so trusted that generally the reviewer won't be as careful as they should be).

Approving but not merging in case @wbamberg had anything else outstanding.

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 for the fixes @Josh-Cena !

@wbamberg wbamberg merged commit 1d2dd9c into mdn:main Sep 22, 2025
9 checks passed
@Josh-Cena Josh-Cena deleted the fix-content branch September 22, 2025 23:09
@Josh-Cena
Copy link
Member Author

Thanks. I'll be more careful next time, but sorry I can't really promise it won't happen again😅

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

Labels

Content:CSS Cascading Style Sheets docs Content:Learn Learning area docs Content:Security Security docs Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed system [PR only] Infrastructure and configuration for the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weekly spelling check

3 participants