Answer the question
In order to leave comments, you need to log in
Wait for DOM to load in chrome extension?
I am writing a browser extension and I ran into a difficulty - I need to open the url in a new tab and execute the script.
chrome.tabs.create({
url: 'http://ooo.com',
active: true,
var sos = document.getElementById("id").children[0];
});
Answer the question
In order to leave comments, you need to log in
Inject a content script into this page, wait for DOMContentLOaded there, and from there send a message with the data you need to get from the page via runtime.sendMessage. Profit.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question