XML DOM createProcessingInstruction() method

Manual na ƙanam Document

Definition and usage

The createProcessingInstruction() method creates a ProcessingInstruction node.

Grammar:

createProcessingInstruction(target,data)
Parameter Description
target Target of the processing instruction.
data Content text of the processing instruction.

Return value

Newly created ProcessingInstruction node.

throw

If target If it contains illegal characters, an error code of INVALID_CHARACTER_ERR will be thrown Ƙarɗe na DOMException.

If it is an HTML document, processing instructions are not supported, and an error code of NOT_SUPPORTED_ERR will be thrown Ƙarɗe na DOMException.

Manual na ƙanam Document