I am developing a chrome extension (content script) to access web page content. I use the DOM to access all elements in page. My code does not work correctly when the web page contains "frameset". In this matter I can count the frame number but I can't access to the frame content. I use this code to count frame objects available on current page :
for frameset :
parent.frames.length
and for iframe :
document.getElementsByTagName("iframe").length
but the following code does not work :
parent.frames[0]
and returns "undefined".
My question: How can I access to frame set elements inside a chrome extension (for both iframe and frameset)?