Force unbind of all eventlisteners by loading a new empty document and waiting for it to be loaded
function removeIframe(frame, cb) {
var emptyHtmlPage = "data:text/html;charset=utf-8;base64,PGh0bWw+PGJvZHk+PC9ib2R5PjwvaHRtbD4=";
frame.setAttribute("src", emptyHtmlPage);
frame.addEventListener("load", function() {
frame.parentElement.removeChild(frame);
if (cb) {
cb();
}
});
}
function removeIframe(frame, cb) {
var emptyHtmlPage = "data:text/html;charset=utf-8;base64,PGh0bWw+PGJvZHk+PC9ib2R5PjwvaHRtbD4=";
frame.setAttribute("src", emptyHtmlPage);
frame.addEventListener("load", function() {
frame.parentElement.removeChild(frame);
if (cb) {
cb();
}
});
}
function removeIframe(frame, cb) { var emptyHtmlPage = "data:text/html;charset=utf-8;base64,PGh0bWw+PGJvZHk+PC9ib2R5PjwvaHRtbD4="; frame.setAttribute("src", emptyHtmlPage); frame.addEventListener("load", function() { frame.parentElement.removeChild(frame); if (cb) { cb(); } }); }
184700cookie-checkRemove Iframe (force garbage collection