cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@chromium.org>
Subject Re: unclobber ?
Date Thu, 11 Jul 2013 12:23:35 GMT
I did the same thing for the console plugin yesterday - copy & pasted the
js-module into all <platform> tags except Android. It's a bit annoying, but
it will mean the module doesn't even end up being loaded for the platform
that doesn't need it.


On Wed, Jul 10, 2013 at 7:52 PM, Filip Maj <fil@adobe.com> wrote:

> I think you may have to use a combination of both to get it right
>
> On 7/10/13 4:46 PM, "Jesse" <purplecabbage@gmail.com> wrote:
>
> >Thanks Fil,
> >Trying option 1:
> >move the <js-module> definition into the platform definitions, so then
> >you can do something different for windows phone.
> >
> >@purplecabbage
> >risingj.com
> >
> >
> >On Wed, Jul 10, 2013 at 4:35 PM, Filip Maj <fil@adobe.com> wrote:
> >
> >> I don't think there's anything in the spec that specifically models
> >>"only
> >> patch global `x` if it doesn't exist" if that¹s what you're asking.
> >>
> >> A few workarounds:
> >> - move the <js-module> definition into the platform definitions, so then
> >> you can do something different for windows phone.
> >> - use the <require> tag instead of <clobbers> or <merges>,
and do the
> >> global assignment yourself in the JS
> >>
> >> On 7/10/13 4:14 PM, "Jesse" <purplecabbage@gmail.com> wrote:
> >>
> >> >So in the plugin breakout for Geolocation, we have come across an issue
> >> >for
> >> >windows phone.
> >> >The WebBrowser control already has a W3C compliant implementation of
> >>the
> >> >spec, and so we actually don't need to do much to 'install' this
> >>plugin.
> >> >However, because of the following config.xml fragment, and the
> >>resulting
> >> >modification to navigator.geolocation, the working browser code is
> >> >clobbered, and we are left with js code that attempts to call
> >>cordova.exec
> >> >into non-existent native code.
> >> >
> >> ><clobbers target="navigator.geolocation" />
> >> >
> >> >What would be the preferred way of NOT clobbering the working
> >> >implementation, or at least storing a reference to the clobbered
> >> >implementation so we can duckpunch back to it, or to specify that our
> >> >version of the plugin will NOT be including js at all?
> >> >
> >> >
> >> >@purplecabbage
> >> >risingj.com
> >>
> >>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message