Your example:
document.getElementById('iframe').removeChild(document.getElementById('embedded_article'));
It should look something like this:
var element = frames['iframe'].document.getElementById('embedded_article');
element.parentNode.removeChild(element);
window.frames['yourFrameId']evaluates the object windowassociated with your frame. when you use document.getElementById, you want to use documentthat belongs to your frame window, and not documentin the main window. The rest should be self-evident.
source
share