v150 · HTML · DOM
PI Query Lab
Create, query, traverse, and delete ProcessingInstruction nodes using the DOM API. Walk the document with a TreeWalker filtered to NodeFilter.SHOW_PROCESSING_INSTRUCTION, find PIs by target, and serialise them back with outerHTML.
Checking ProcessingInstruction support…
Create ProcessingInstruction
target:
data:
ProcessingInstruction nodes in sandbox
No PI nodes yet. Create one above.
Query & traverse
target filter:
Click a query button above…
Live DOM tree (sandbox)
// DOM tree will appear here
Activity log
// Create PI nodes above to explore the API…
see also
- PI DOM Explorer — inject markup and inspect PI nodes
- Live PI Editor — type HTML with PIs and see the DOM tree
- XML Compat Demo — xml-stylesheet PI target use case
- ChromeStatus: Parse processing instructions in HTML
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗