I am using NODE JS module with which I am creating a HTTP server. Server's response is a page containing JavaScript which embed a webpage in . Here is response code:
<html>
<head>
<script type='text/javascript'>
function test() {
document.body.innerHTML='<iframe id="ifool" src="URL" sandbox="allow-same-origin allow-forms allow-scripts"> </iframe>';
var c;
window.setInterval(function(){
c=document.getElementById("ifool").contentWindow.location.href;
window.history.pushState(0,0,c);
},100);
</script>
</head>
<body onload= "test()">
</body>
</html>
I am using Firebug with FF.I am getting following error:
Error: Permission denied to access property 'href'
c=document.getElementById("ifool").contentWindow.location.href;