Here is my situation.
I have a file called iframe.html
, which contains the code to for a image slideshow.
The code is somewhat like
<
Why not try Ajax, check a code part 1 or part 2 (use comment).
$(document).ready(function(){
console.clear();
/*
// PART 1 ERROR
// Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Sandbox access violation: Blocked a frame at "http://stacksnippets.net" from accessing a frame at "null". Both frames are sandboxed and lack the "allow-same-origin" flag.
console.log("PART 1:: ");
console.log($('iframe#sandro').contents().find("html").html());
*/
// PART 2
$.ajax({
url: $("iframe#sandro").attr("src"),
type: 'GET',
dataType: 'html'
}).done(function(html) {
console.log("PART 2:: ");
console.log(html);
});
});