Sorry for the rough title. I have an iframe into my document. I want that on some event the iframe destroys itself becoming the parent (main) document. For example, running the following code
var el = document.createElement("iframe");
el.setAttribute('id', 'ifrm');
document.body.appendChild(el);
el.setAttribute('src', 'http://www.gmail.com');
after a while or after the login the iframe disappears and takes the place of the main document. How can I obtain the same behaviour?
You are looking for a framekiller