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

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗