henriqueboaventura / jquery.idle

A dead simple jQuery plugin that executes a callback function if the user is idle.
Other
251 stars 79 forks source link

same origin iframe #36

Open lordcoste opened 5 years ago

lordcoste commented 5 years ago

Hi, I know that is not possibile to detect activity on cross-origin iframe, but what about same-origin iframe? I need to detect activity while scrolling a pdf opened in a same-origin iframe with pdf.js.

Is that possible?

Could something like https://github.com/JillElaine/jquery-idleTimeout/blob/master/jquery-idleTimeout-iframes.js be used?

Best regards

henriqueboaventura commented 5 years ago

Hey, so, in this particular case, it uses some kind of session to handle the activity between the origin and the iFrame, it really works, but needs a lot of dependencies that will require deep changes on the plugin. Also, since you are trying to handle de activity on a PDF using pdf.js, I'm not sure that this update would help. Have you tried use the JillElainer plugin successfully?