Hey guys I’m trying to add an iframe to a page using append. In firefox it adds an empty iframe but in chrome it works as it should. The empty iframe is appended only when windowLocation is window.location. When I change it to some other url it works fine.
$("#button").click(function () {
var windowLocation = window.location;
$("body").append('<iframe id="fullFrame" width="1000" height="1000"></iframe>');
$("#fullFrame").attr("src", windowLocation);
});
To me this looks like this would create a recursion. According to some old specs for framesets, such a frame should be treated as empty in that case: http://www.w3.org/TR/WD-frames-970331#nesting
So maybe Firefox implements this behaviour.