ember-user-activity
ember-user-activity copied to clipboard
track iframe activity
I have a route within my application that loads an iframe, and any activity within that iframe (ex. keydown
, mousedown
, scroll
, etc.) needs to be tracked and keep the application's session alive. The activity service adds events via the window.addEventListener
, which does not propagate to iframes.
Has anyone added this behavior with ember-user-activity
? Could an API be added to this addon to allow tracking behavior within iframes?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
There might be some DOM events that work for iframes, particularly if they are on the same domain as the app itself. You could look into which events have approximations for iframes, though they might not work exactly the same as expected. That said, you're not going to get full functionality unless you can alter the code running in the iframe itself to post messages out when these events occur. You'd essentially have to reimplement this service inside the iframe and listen for those messages in your application.