On Mon, Dec 3, 2012 at 8:32 PM, Andrew Lunny <[email protected]> wrote:
> The problem, afaict, is distinguishing between: > > 1) deviceready hasn't fired yet > 2) deviceready isn't ever going to fire > > which right now boils down to "guess how long deviceready will take, and > setTimeout() until some time after that." > Yup. Exactly. > I tend to agree with Max - it'd be a worthwhile thing to have, unless the > implementation is prohibitively difficult. > The implementation of this isn't difficult. It is however, suspect, since it's based on some arbitrary time amount. Is 5 seconds long enough - seems like it would be. But maybe not. 10? Do we decide what this number is, or does the user? I can see the questions on the Google group already ... :-) And what is the app supposed to do until this time amount expires? When I think about the problem like that, I start to think "progressive enhancement". eg, build this page in such a way that it will "work", presumably in some degraded way, if deviceready never fires, and then if deviceready DOES fire, reshuffle your bits to take that into account. -- Patrick Mueller http://muellerware.org
