最佳答案
I'm writing a Chrome extension and trying to overlay a <div>
over the current webpage as soon as a button is clicked in the popup.html file.
When I access the document.body.insertBefore
method from within popup.html it overlays the <div>
on the popup, rather than the current webpage.
Do I have to use messaging between background.html and popup.html in order to access the web page's DOM? I would like to do everything in popup.html, and to use jQuery too, if possible.