-
Notifications
You must be signed in to change notification settings - Fork 116
Processor Instructions
Matt Farina edited this page Sep 10, 2013
·
7 revisions
The html5 spec does not allow processor instructions. We do. This is a server side library and we believe they are useful.
Take the document:
<!DOCTYPE html>
<html>
<?foo bar?>
</html>
The <?foo bar?> is a processor instruction. Processor instructions start with a <?, are followed with a node name (foo in this case), and close with a ?>.
When this is parsed using \HTML5::loadHTML() the processor instruction node will be one of \DOMProcessingInstruction with a nodeName property of foo and a data property of bar.
Processing instructions can be useful when we act on them. For example, manipulating the DOM.
TODO: Insert example