It's a fairly simple jQuery function but I'm dealing with an iframe which will be displayed on clients' websites who may not be using jQuery. How would this look as pure JS?
$("#pgft-gvway-3xs-iframe").load(function() {
$(this).height($(this).contents().find("html").height() );
});
UPDATE:
Thanks to everyone who answered. Using a combination of answers I used the following. It did what I needed it to:
window.addEventListener('load', function(e) {
var elem= document.getElementById("pgft-gvway-3xs-iframe");
var insideheight= elem.contentWindow.document.height;
elem.style.height= insideheight + "px";
}, false);