<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3395" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left>David Bennett<SPAN class=298553706-01092009>
wrote:</SPAN></DIV><FONT face=Verdana size=2></FONT><FONT face=Verdana
size=2></FONT><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV class=gmail_quote>On Mon, Aug 31, 2009 at 5:30 PM, Drew Wilson <SPAN
dir=ltr><<A
href="mailto:atwilson@google.com">atwilson@google.com</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">This
would be my inclination as well. I'm not entirely convinced that "every web
app should define their own idle timeout" is such desirable behavior that we
should build our API around it by forcing every caller to specify their idle
timeout - having a standard event that's fired with an exposed state for
apps that need it seems like a cleaner approach.
<DIV></DIV></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>The trouble with this is it doesn't allow any experimentation on the part
of the app/entity to figure out what is the best idle time for it's purposes.
In terms of chat it might be that a 3 minute or 5 minute idle time works
best in terms of people's attention. For something like watching a
video perhaps a 15 minute idle would be a better length of time, or for an
online game a longer idle time is probably useful before being signed out.
Different purposes have different requirements for the idle time so it
makes sense to allow them to specify the different
timeouts.</DIV></DIV></BLOCKQUOTE>
<DIV dir=ltr><FONT face=Verdana size=2><SPAN class=298553706-01092009>This
requirement could be solved in several other ways, f ex making sure that the
"standard" timeout period is short enough to not be longer than what any app
wants. Then (as was previously suggested) an app that wants a longer timeout can
do setTimeout and trigger its own idle stuff if status has not come back to
"active" during that time.</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2><SPAN
class=298553706-01092009></SPAN></FONT> </DIV>
<DIV dir=ltr><FONT face=Verdana size=2><SPAN class=298553706-01092009>Another
alternative is to have no event, and just a property:</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2><SPAN class=298553706-01092009>
window.lastUserActionTime</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2><SPAN
class=298553706-01092009>which is kept updated with the "msec since
epoch" for the latest user input on the desktop. Then an app can implement its
own idle functionality with totally own rules. This API has the drawback of
maybe exposing too much information (the rate of input events to other apps),
but may spawn some ideas.</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2><SPAN
class=298553706-01092009></SPAN></FONT> </DIV>
<DIV dir=ltr><FONT face=Verdana size=2><SPAN class=298553706-01092009>Best
regards</SPAN></FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2><SPAN
class=298553706-01092009>Mike</SPAN></FONT></DIV></BODY></HTML>