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});