html - Why are iFrames not being loaded in Safari on some pages? -
we have encountered issue on 1 of our intranet pages iframe not loading head or html code.
the issue occurs in safari (el capitan, yosemite , iphones) , happening on 1 particular page. when inspecting html can see iframe code, when expand #document section there html tag empty.
in console there no errors show up. thing notice there less data being loaded , 15 less calls.
could give insight might cause iframe not load properly? seems timing thing can use javascript insert iframe tag empty div after document ready works.
thanks!
edit: sample iframe code:
<iframe allowfullscreen="true" src="https://www.youtube.com/embed/[youtubeid]?rel=0&wmode=opaque" frameborder="0"></iframe>
i know issue old did tried adding settimeout append iframe code or adding onload event ?
settimeout(function() { div.innerhtml = '<iframe allowfullscreen="true" src="https://www.youtube.com/embed/[youtubeid]?rel=0&wmode=opaque" frameborder="0"></iframe>'; div.queryselector("iframe").addeventlistener("load", function() { console.warn("video loaded"); div.queryselector("iframe").focus(); }); }, 100);
Comments
Post a Comment