incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-298) DEPRECATE "plugins" and "PhoneGap" global objects in JavaScript implementation
Date Tue, 01 May 2012 20:38:54 GMT

    [ https://issues.apache.org/jira/browse/CB-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266057#comment-13266057
] 

Shazron Abdullah commented on CB-298:
-------------------------------------

Did you see my comment:

---------------------
Found the problem, it's a timing issue:
Before this function is called:
https://github.com/apache/incubator-cordova-js/blob/master/lib/cordova.js#L281

... cordova.exec is not defined yet.
---------------------

I understand how deprecateFunctions works - in this case however, it can't "add" a deprecation
notice to .exec because the function doesn't exist in the cordova object at this point.

In any case, adding the PhoneGap and Cordova globals in common/common.js would suffice without
adding the (if (!window.PhoneGap)) in lib/cordova.js since deprecateFunctions does not work
(because of the reason I mentioned in the previous paragraph).


                
> DEPRECATE "plugins" and "PhoneGap" global objects in JavaScript implementation
> ------------------------------------------------------------------------------
>
>                 Key: CB-298
>                 URL: https://issues.apache.org/jira/browse/CB-298
>             Project: Apache Callback
>          Issue Type: Improvement
>          Components: CordovaJS
>    Affects Versions: 1.4.0, 1.5.0, 1.6.0
>            Reporter: Filip Maj
>            Assignee: Shazron Abdullah
>            Priority: Minor
>              Labels: api-change, javascript
>             Fix For: 1.7.0
>
>
> There are two globals currently defined in Cordova-JS' common platform definition, which
get dropped onto the `window` object: `plugins` and `PhoneGap`.
> Let's slate these for removal.
> In 1.6, let's set up deprecation notices for these.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message