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

adoptNode

characterSet

compatMode

contentType

createCDATASection

createComment

createDocumentFragment

createElement

createElementNS

createTextNode

doctype

Document

documentElement

documentURI

exitPictureInPicture

getElementsByClassName

getElementsByTagName

getElementsByTagNameNS

implementation

importNode

pictureInPictureEnabled

URL

write

writeln

Web Hypertext Application Technology Working Group (WHATWG)

Home Menu