I am trying to insert a piece of HTML at the very top of a document that looks something like this:
<html> <frameset onunload="unload()" onload="loadme()" id="topframeset" frameborder="0" framespacing="0" rows="45,19,10,0,*,22"> (...) </frameset> </html>
OK - it seems easy. In Firebug, I can do:
>>> document.getElementById("topframeset") <frameset id="topframeset" onunload="unload()" onload="loadme()" frameborder="0" framespacing="0" rows="45,19,10,0,*,22">
So this is wonderful.
Then:
document.insertBefore(document.createTextNode("<h1>hello</h1>"), document.getElementById("topframeset")) Error: Node was not found [Break On This Error] ...ertBefore(document.createTextNode("<h1>hello</h1>"), document.getElementById("to...
What's happening?
source share