0

I'd like to make a tool which allows to process data picked from an iframed page. Something similar to this:

http://jsfiddle.net/jr6uG/4/

I stopped on events (hover, click, etc.). Is it possible to do it my way? Is there a better way?

I need somthing like this:

$('iframe body *').bind('click', function(event){
    console.log('clicked', this);
});

1 Answer 1

2

The iframe runs a separate DOM, meaning there's no interoperability between DOM objects in the original document and the iframe document.

You'd have to do this over the network. A little like JSFiddle captures console logs from within the iframe generated to the console in the document you're viewing.

To process data picked from an iframed page, as you're intending to do, you'd be looking to direct any page that you're trying to process through a bespoke proxy, where you could inject your own scripts, for example, to create an alert when an element is clicked.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I decided to download page sources (with JSes, CSSes, etc.), inject my css and JSes and then render it. I think you suggested it so.. I'm accepting your answer. :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.