You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Patrick Mueller (Commented) (JIRA)" <ji...@apache.org> on 2012/03/26 15:46:32 UTC
[jira] [Commented] (CB-298) DEPRECATE and then remove "plugins" and
"PhoneGap" global objects from JavaScript implementation
[ https://issues.apache.org/jira/browse/CB-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238388#comment-13238388 ]
Patrick Mueller commented on CB-298:
------------------------------------
I have no problem deprecating these, as long as we create some kind of document telling people how to provide "externs" for their plugin, and some guidance.
For instance, [BarcodeScanner|https://github.com/phonegap/phonegap-plugins/blob/master/iOS/BarcodeScanner/barcodescanner.js] exposes it's "business object" via {{window.plugins}}. What should it be doing instead?
Also, what is the mechanism you're planning to use to deprecate {{window.plugins}}? I suppose we could check after running the plugin 'constructor' (specified via {{Cordova.addConstructor()}}) whether or not {{windows.plugin != null}}, and generate a console message.
> DEPRECATE and then remove "plugins" and "PhoneGap" global objects from 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
> Reporter: Filip Maj
> Assignee: Filip Maj
> Priority: Minor
> Labels: api-change, javascript
> Fix For: 1.6.0, 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. In 1.7, let's remove them.
--
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