Announcing IframeActivityMonitor

The IframeActivityMonitor is available on github.

Iframes have serious tradeoffs you have to consider when building an application. But I see them in use frequently, and sometimes they are even appropriate.

A difficult scenario is when the parent window needs to track user activity within a child iframe, when the child iframe contains content from a different domain.

In a nutshell, browsers’ same origin policy comes into effect, and JavaScript from the parent is blocked from making function calls, sending events, or adding event listeners to the child iframe content. The iframe’s onload event is sufficient for many needs. But if the iframe itself is a single-page AJAX application, then the onload event will not fire after the first load.

The IframeActivityMonitor is a simple JavaScript object that allows you to receive an event periodically while the user maintains activity within any iframe on the page.

Check out the IframeActivityMonitor on github!

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>