0

I need a way to know in my Chrome extension when running the content script that the frame being loaded is not an iframe. I am trying to construct an array of objects containing the URL's that the user has traveled to (see below). I need to set all_frames to true in my manifest file because I also have to be able to access elements inside iframes. Does anyone know how I can know if the frame currently running my content script is the window and not an iframe?

//if(window is not iframe)
    sendData({Task : "Load Page", Path : location.href});
CaitlinHavener
  • 1,408
  • 3
  • 24
  • 53
  • See also: [Is there a way to uniquely identify an iframe that the content script runs in for my Chrome extension?](http://stackoverflow.com/q/26010355/934239) – Xan Dec 22 '15 at 09:51
  • Okay thank you, was unable to find that originally, but it did help. :) – CaitlinHavener Dec 22 '15 at 16:17

0 Answers0