I am trying to use chrome.windows.onCreated
but I got Uncaught TypeError: Cannot read property 'onCreated' of undefined
. I noticed in the samples, all calls to chrome.*
API's seem to originate from background scripts? Can I not use them in content scripts?
I want to trigger clicks in my browser. Then get some information (scrape) in popup window. For that I think I will need to know when a window is opened. So I need windows.onCreated
? Can I use that in content scripts? Or how will I combine background and content scripts?