createProcessingInstruction

The createProcessingInstruction JS Document returns a ProcessingInstruction node whose target is target and data is data.

If target does not match the Name production an "InvalidCharacterError" DOMException will be thrown. If data contains "?>" an "InvalidCharacterError" DOMException will be thrown.

Syntax

processingInstruction = document.createProcessingInstruction(target, data)

Parameters

target

A node.

data

An any type.

Examples

1

2

HomeMenu