views:

443

answers:

2

how do i minify this in mootools.

window.frames['buffer'].document.body.innerHTML

in mootools, this does not work:

$('buffer').$('body').get('html');

OR

$('buffer').get('html')
+1  A: 

$('#iframeId').contents().html(); should work, it seems.

See: http://api.jquery.com/contents/

edit: actually, I ran the following code on the above site and it works:

var s = $('iframe:first').contents().find('*').html()

Jim Schubert
thanks but was not similar to mootools. Sorry should have clarified!
lowkey
+3  A: 

As long as your page and iframe are in the same domain you should be able to use the following:

new IFrame('buffer').contentDocument.getElement('body').get('html');
Randy Simon
Yes, but thats quite longer than the original non javascript version isn't it? :)
lowkey