あるフレームから別のフレームにコンテンツをコピーしています。コードは Mozilla Firefox では機能しますが、Google Chrome では機能しません。誰かが私がどこで間違ったのか教えてもらえますか?
この部分は Google chrome で実行されていません:
$('#frame1').load(function(e){
});
以下は私のコードブロックです:
$headContent = $("#mainframe").contents().find("head").html();
$bodyContent = $("#mainframe").contents().find("body").html();
$('<iframe />');
$('<iframe />',{ id: 'frame1',
class:'myframe',
height: 600,
width: "100%"
}).appendTo(uxcontainerPath);
$('#frame1').load(function(e){
console.log("Executed #frame1 load"); //this console line is not executed in chrome
$(this).contents().find('html').append('<head></head>');
$(this).contents().find('head').append($headContent);
$(this).contents().find('body').append($bodyContent);
});