Open DenisGorbachev opened 9 years ago
Arrive won't fire for elements within an iframe unless you attach it to the document
or some other element within an iframe. If you have access to the iframe then you can attach it to the document
of iframe
@uzairfarooq that's exactly what I am doing: attaching arrive to the iframe document. However, it doesn't work. Could you please chevk?
Hmm...haven't tried it before on iframe. Will look into it.
Hi @uzairfarooq, I'm also interested in this feature but can't get it to work. 😄 Anything I can do to help debug or implement this?
The monitoring package is a rewrite of arrive
and can watch for elements in iframes:
const monitor = monitoring(document.body, {iframes: true});
monitor.added('div', div => {
if (div.ownerDocument != document) {
console.log('new div in an iframe!');
}
});
Disclosure: I am the author of monitoring
.
I have a parent page that embeds a child iframe. I set up arrival listeners for elements in child iframe; however, these listeners are never called. Is it possible to use arrive.js with iframes?
P.S. I'm running
google-chrome --disable-web-security
to bypass same-origin checks.