I wrote a chrome extension that works before the page loads (using the attribute "run_at": "document_start"). The problem is that I want to add a tag divto the body of a web page right after it is created. Prior to this, document.bodyit is null, so I can not add tags to it.
I don’t care about the full load of the body, I just need it to exist.
I am trying to find a better way to be warned if a tag bodyin html is created (not fully loaded, just created). Is there any event handler for this case that I can write?
In addition, I do not want to use jQueryor any other non-built-in library.
Thank!
source
share