I wrote a Chrome extension that works before the page is loaded (using the attribute "run_at": "document_start"
).
The problem is that I want to add a div
tag to the web page body as soon as it is created.
Before that document.body
is null so I can't append tags to it.
I don't care about full load of the body, I just need it to be existent.
I am trying to find the best way to be alerted when the body
tag in html is created (not loaded fully, just created). Is there any event handler for this case that I can write?
Also, I don't want to use jQuery
or any other non built-in library.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…