Skip to content

Add HTML Processing Instruction docs - #45104

Merged
chrisdavidmills merged 19 commits into
mdn:mainfrom
tunetheweb:processing-instructions
Aug 13, 2026
Merged

Add HTML Processing Instruction docs#45104
chrisdavidmills merged 19 commits into
mdn:mainfrom
tunetheweb:processing-instructions

Conversation

@tunetheweb

Copy link
Copy Markdown
Contributor

Description

Chrome 150 supports Processing Instructions in HTML documents.

Prior to this they were treated as comments by all browsers as noted in the current docs

Warning: ProcessingInstruction nodes are only supported in XML documents, not in HTML documents. In these, a process instruction will be considered as a comment and be represented as a Comment object in the tree.

This warning is now no longer accurate.

Chrome also added some extra methods (getAttribute, getAttributeNames...etc) similar to the equivalents on Element so this PR adds those docs (based on the Element versions).

Motivation

Incorrect and missing docs

Additional details

https://chromestatus.com/feature/6534495085920256

Related issues and pull requests

@tunetheweb
tunetheweb requested a review from a team as a code owner August 12, 2026 16:58
@tunetheweb
tunetheweb requested review from sideshowbarker and removed request for a team August 12, 2026 16:58
@github-actions github-actions Bot added Content:WebAPI Web API docs size/l [PR only] 501-1000 LoC changed labels Aug 12, 2026
@Josh-Cena
Josh-Cena requested review from chrisdavidmills and removed request for sideshowbarker August 12, 2026 21:53

@chrisdavidmills chrisdavidmills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work here, @tunetheweb. I've left quite a few comments, but these are mainly to do with grammar and page structure stuff. Nothing too serious.

Comment thread files/en-us/web/api/processinginstruction/index.md Outdated
Comment thread files/en-us/web/api/processinginstruction/index.md Outdated
Comment thread files/en-us/web/api/processinginstruction/index.md
Comment thread files/en-us/web/api/processinginstruction/index.md
Comment thread files/en-us/web/api/processinginstruction/index.md Outdated
Comment thread files/en-us/web/api/processinginstruction/toggleattribute/index.md Outdated
Comment thread files/en-us/web/api/processinginstruction/toggleattribute/index.md Outdated
Comment thread files/en-us/web/api/processinginstruction/toggleattribute/index.md Outdated
Comment thread files/en-us/web/api/processinginstruction/toggleattribute/index.md
Comment thread files/en-us/web/api/processinginstruction/toggleattribute/index.md Outdated
chrisdavidmills

This comment was marked as duplicate.

Comment thread files/en-us/web/api/processinginstruction/index.md Outdated
@tunetheweb

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review again @chrisdavidmills ! Think I've addressed it all now.

Many (most?) of the comments you noted were issues with the Element equivalents of these pages (e.g. Element.setAttribute, but given the size of those docs, and issues affect other pages in that section as well, I'm not volunteering to make the same changes there - sorry/not sorry 😊

@noamr could you have a look over this before we merge to make sure I'm speaking the truth here?

Comment thread files/en-us/web/api/document/createprocessinginstruction/index.md Outdated
Comment thread files/en-us/web/api/processinginstruction/getattribute/index.md Outdated
tunetheweb and others added 2 commits August 13, 2026 14:51
Co-authored-by: Noam Rosenthal <noamr@users.noreply.github.com>
Comment thread files/en-us/web/api/document/createprocessinginstruction/index.md
@noamr

noamr commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Technical LGTM

Comment thread files/en-us/web/api/processinginstruction/index.md Outdated
Comment thread files/en-us/web/api/processinginstruction/index.md Outdated
@tunetheweb

Copy link
Copy Markdown
Contributor Author

Just two spots from me @chrisdavidmills . Other than those, happy with your edits.

@chrisdavidmills chrisdavidmills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@tunetheweb Verrrrry nearly there. Just a couple more small bits for you to ponder.

Comment thread files/en-us/web/api/document/createprocessinginstruction/index.md
Comment thread files/en-us/web/api/document/createprocessinginstruction/index.md
Comment thread files/en-us/web/api/processinginstruction/index.md Outdated
Comment thread files/en-us/web/api/processinginstruction/index.md Outdated
chrisdavidmills and others added 2 commits August 13, 2026 17:26

@chrisdavidmills chrisdavidmills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Aaaaand we're done. Thanks again, @tunetheweb.

@chrisdavidmills
chrisdavidmills merged commit b449f4c into mdn:main Aug 13, 2026
9 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/l [PR only] 501-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants