Confirmed users
31
edits
| Line 16: | Line 16: | ||
window.addEventListener('layerFocus', fn) | window.addEventListener('layerFocus', fn) | ||
'' Focus isn't quite the same as active/visible. On the desktop, focus doesn't happen until an element in the window receives focus. I'm not sure how that plays out on touch devices. I think we want visibility'' | |||
''There is an actual API for this: [http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html PageVisibility] but we would have to investigate browser support. As I understand it, our "layers" are going to be window object in UiWebViews or their equivalent, so this seems like the right place to start. I would rather polyfill this though than invent our own.'' | |||
* http://davidwalsh.name/page-visibility | |||
* https://developer.mozilla.org/en-US/docs/DOM/Using_the_Page_Visibility_API | |||
* https://github.com/ai/visibility.js | |||
==== As a front-end developer, I need a way to securely ''verify that the user is authenticated'' so that I do not expose confidential information. ==== | ==== As a front-end developer, I need a way to securely ''verify that the user is authenticated'' so that I do not expose confidential information. ==== | ||