- From: Wojciech Masłowski <wmaslowski@opera.com>
- Date: Thu, 25 Aug 2011 09:20:43 +0200
- To: louis-rémi Babé <lrbabe@gmail.com>
- CC: public-geolocation@w3.org
W dniu 2011-08-24 09:45, Charles McCathieNevile pisze: > On Tue, 23 Aug 2011 19:33:29 +0200, Richard L. Barnes > <rbarnes@bbn.com> wrote: > >> +1 > > Agreed. There are easy ways in Opera to control the information you > send websites. It would seem to suggest that this is something that > the user agent should handle in its UI, rather than being in the spec. > For debugging in Opera you might try Geolocation Provider unite app which implements alternative dummy geolocation provider service. http://unite.opera.com/application/701/ > cheers > >> On Aug 23, 2011, at 1:21 PM, Doug Turner wrote: >> >>> >>> I think this is out of scope of the working group. >>> >>> Regards, >>> Doug >>> >>> On Aug 23, 2011, at 8:58 AM, louis-rémi Babé wrote: >>> >>>> Yes, this is what I want to do. >>>> This kind of API shouldn't be able to control browser features such as >>>> permission prompt. >>>> >>>> Looking at NetworkGeolocationProvider.js in Mozilla central, this >>>> doesn't appear easy to do. >>>> And it is impossible to do in all other browsers. >>>> >>>> I'm aware that allowing developers to debug an API is not usually part >>>> of that API design. But most APIs are still easy to debug (it is >>>> possible to generate custom events to debug event based APIs for >>>> instance). Developers are able to create their own tools and do not >>>> have to wait for browser vendors to implement ready to use tools. >>>> >>>> The geolocation API can currently be only debugged if you own the >>>> source code of the application and insert "debugging hooks". >>>> >>>> I think this situation is not ideal. And I think giving users an easy >>>> way to control the position info sent to websites is important too. >>>> >>>> Lr >>>> >>>> 2011/8/17 Doug Turner <doug.turner@gmail.com>: >>>>> So, in general, you want a way to setup a mock position for >>>>> testing purposes? Do you also want to be able to control the >>>>> permission prompt in this case? >>>>> >>>>> In FF's case, it is trivial to write an add-on that does this - >>>>> something that you can share with other users. (In fact, our test >>>>> infrastructure basically has exactly this without the add-on >>>>> packaging). >>>>> >>>>> Doug >>>>> >>>>> On Aug 17, 2011, at 8:31 AM, louis-rémi Babé wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> I'm currently frustrated by the lack of debuging tools regarding the >>>>>> geolocation API, as opposed to other event based device APIs such as >>>>>> deviceorientation. >>>>>> >>>>>> To debug deviceorientation, I can simply generate a custom event >>>>>> right >>>>>> from my js console using create/init/dispatchEvent. >>>>>> And I can do so on any website listening to deviceorientation events >>>>>> (I don't need to be the author). >>>>>> >>>>>> It is impossible to do the same thing with the geolocation API. To >>>>>> debug it I need the following kind of code: >>>>>> >>>>>> // can't use inline handler >>>>>> function positionHandler( event ) { >>>>>> ... >>>>>> } >>>>>> navigator.geolocation.watchPosition( positionHandler ); >>>>>> // need to create a global "debug object" to make the >>>>>> // positionHandler available from my js console >>>>>> window.updatePosition = positionHandler; >>>>>> >>>>>> It requires to add one extra line to my code for debugging purpose, >>>>>> and I need to be the author of the website. >>>>>> I can alternatively write a geolocation provider for my Web browser, >>>>>> but that requires a far larger amount of work, a kind of knowledge >>>>>> that Web developers do not necessarily have, and it isn't a cross >>>>>> browser solution. >>>>>> >>>>>> geolocation.setCurrentPosition() would allow to create a fake >>>>>> position >>>>>> in the flow of "real" position updates. >>>>>> Users could simply ignore the "permission prompt" on a website >>>>>> and use >>>>>> setCurrentPosition() to have complete control over the position >>>>>> updates provided to a website. >>>>>> >>>>>> Thank you in advance for your feedback, >>>>>> louisremi@mozilla.com >>>>>> >>>>> >>>>> >>> >>> >> > > -- Wojciech Masłowski Engeneering CORE Wrocław Opera Software ASA http://www.opera.com
Received on Thursday, 25 August 2011 07:21:34 UTC