incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shazron <shaz...@gmail.com>
Subject Re: Advice for upgrading iOS plugins for 1.6?
Date Mon, 09 Apr 2012 18:26:13 GMT
See that's a big 'should' - most of the js out there will not have
this closure so they won't pollute the global namespace (my old
plugins in the plugins repo included!), but good idea regarding that
last myCordovaRef part. Maybe I should help convert a few as an
example...

On Mon, Apr 9, 2012 at 11:19 AM, Jesse <purplecabbage@gmail.com> wrote:
> My 'advice' would be, inside the closure that the plugin code 'should' be
> wrapped in, the developer of the plugin writes something like :
>
> var myCordovaRef = window.PhoneGap || window.Cordova || window.cordova;
>
> No need to pollute the window with all the aliases it has ever had. The dev
> just needs to find it ...
>
> On Mon, Apr 9, 2012 at 11:14 AM, Shazron <shazron@gmail.com> wrote:
>
>> That went away in 1.6.0 right? What would be the shim, would you know?
>> Do you think that is only used by core or third party plugins as well
>>
>> On Mon, Apr 9, 2012 at 11:10 AM, Becky Gibson <gibson.becky@gmail.com>
>> wrote:
>> > We might want to consider something similar for Cordova.hasResource()
>> >
>> >
>> > On Mon, Apr 9, 2012 at 1:52 PM, Shazron <shazron@gmail.com> wrote:
>> >
>> >> What about advice to add a shim like we already have for the PhoneGap
>> >> object
>> >>
>> >> if (!window.Cordova) {
>> >>    window.Cordova = cordova;
>> >> }
>> >>
>> >> I should add this in the Cordova Plugin Upgrade Guide
>> >>
>> >>
>> >> On Mon, Apr 9, 2012 at 7:07 AM, Becky Gibson <gibson.becky@gmail.com>
>> >> wrote:
>> >> > We created a new repository for iOS plugins that that have been
>> updated
>> >> to
>> >> > Cordova (https://github.com/phonegap/phonegap-plugins/tree/master/iOS
>> ).
>> >> >  Now that 1.6 has changed the cordova object from Cordova (capital
C)
>> to
>> >> > cordova (little c) do we have any advice for people updating /
>> submitting
>> >> > plugins to distinguish between 1.5 and 1.6?
>> >>
>>

Mime
View raw message