michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ */ michael@0: michael@0: // check that the second node under the document element is a PI with the michael@0: // specified .target and .data michael@0: function checkDOM(target, data) { michael@0: // assume there are no whitespace nodes in XUL michael@0: var piNode = document.documentElement.childNodes[1]; michael@0: if (!piNode || piNode.nodeType != Node.PROCESSING_INSTRUCTION_NODE || michael@0: piNode.target != target || piNode.data != data) { michael@0: document.documentElement.style.backgroundColor = "red"; michael@0: } michael@0: }