Heh. I *think* you get my point. ...tho now we're bikeshedding a gist... which I cleaned up the code to make it proper html5 hipster.
no quoted attributes. no semicolons. https://gist.github.com/2830598 Tho we should create a repo for this and some other stuff. I'll post a separate note. Also in the future I won't resort to pseudocode that doesn't run to explain. >=/ On Tue, May 29, 2012 at 1:22 PM, Michael Brooks <[email protected]> wrote: > +1 Drew / Jesse's example. > > On Tue, May 29, 2012 at 12:51 PM, Jesse <[email protected]> wrote: > >> Still as a best practice IMHO you should wait for DOMContentLoaded before >> subscribing to deviceready, to avoid issues with the order the scripts are >> included. If the cordova script include was moved to the bottom of the >> page, it would suddenly break. >> >> On Tue, May 29, 2012 at 12:29 PM, <[email protected]> wrote: >> >> > Except that deviceready would ensure DOMContentLoaded has already fired >> > (due to the channel.join call on native ready and domready channels) >> > >> > Sent on the TELUS Mobility network with BlackBerry >> > >> > -----Original Message----- >> > From: Jesse <[email protected]> >> > Date: Tue, 29 May 2012 12:27:01 >> > To: <[email protected]> >> > Reply-To: [email protected] >> > Subject: Re: standard project template >> > >> > Well, code that works should be minimum req. Brian?! >> > >> > The gist looks good, I would just change the body onload tag to be a >> > document.addEventListener a'la https://gist.github.com/2830156 >> > >> > On Tue, May 29, 2012 at 12:14 PM, Drew Walters <[email protected]> >> wrote: >> > >> > > I would like to see the sample app at least show listening for the >> > > 'deviceready' event since that seems to be a common problem and >> > > provides some guarantee of Cordova initialization. >> > > >> > > Something like this maybe? >> > > >> > > https://gist.github.com/2830064 >> > > >> > > On Tue, May 29, 2012 at 1:54 PM, Brian LeRoux <[email protected]> wrote: >> > > > Like that idea too. How about this for the example app: >> > > > >> > > > <script src=cordova-1.8.0.js></script> >> > > > <script>document.write('<h1>hello world from cordova </h1>' + >> > > > device.cordova)</script> >> > > > >> > > > Tag that. Add it to all repos. Accept pull requests for all the stuff >> > > > we've now discussed... >> > > > >> > > > >> > > > On Sat, May 26, 2012 at 7:44 PM, Filip Maj <[email protected]> wrote: >> > > >> +1 on Simon's thought below. >> > > >> >> > > >> Another thought: could this example app simply be generated _from_ >> the >> > > >> documentation, from the "full example" sections? >> > > >> >> > > >> On 5/22/12 8:12 PM, "Simon MacDonald" <[email protected]> >> > > wrote: >> > > >> >> > > >>>On Tue, May 22, 2012 at 2:02 PM, Drew Walters <[email protected]> >> > > wrote: >> > > >>>> >> > > >>>> I would envision that eventually this would get shipped as a >> > > >>>> kitchen-sink type example project, separate from the 'create >> > project' >> > > >>>> command. >> > > >>> >> > > >>>Yeah, when you download the Cordoava-version.zip file this should be >> > > >>>in a directory called example. We should validate that the example >> > > >>>works on all platforms and give people instructions on how to add it >> > > >>>to your first project to highlight the power of PhoneGap. >> > > >>> >> > > >>>Simon Mac Donald >> > > >>>http://hi.im/simonmacdonald >> > > >> >> > > >> > >> > >> > >> > -- >> > @purplecabbage >> > risingj.com >> > >> > >> >> >> -- >> @purplecabbage >> risingj.com >>
