cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-2845) CompassError, PositionError constants not attached to prototype as specified in W3C document
Date Mon, 13 May 2013 22:53:26 GMT

     [ https://issues.apache.org/jira/browse/CB-2845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Shazron Abdullah updated CB-2845:
---------------------------------

    Fix Version/s:     (was: 2.7.0)
                   2.8.0
    
> CompassError, PositionError constants not attached to prototype as specified in W3C document
> --------------------------------------------------------------------------------------------
>
>                 Key: CB-2845
>                 URL: https://issues.apache.org/jira/browse/CB-2845
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 2.5.0, 2.6.0
>         Environment: Any
>            Reporter: Thomas K.
>            Assignee: Filip Maj
>            Priority: Minor
>             Fix For: 2.8.0
>
>
> CompassError.js PositionError.js do not define the error constants on the prototype of
the object. Hence the constants are not passed into the error function as specified in the
W3C document http://dev.w3.org/geo/api/spec-source.html#position_error_interface (see: interface
PositionError { const unsigned short PERMISSION_DENIED = 1; ...)
> Fix: define in the library PositionError.js and Compass.js constants additionally like
this:
> PositionError.prototype.PERMISSION_DENIED = 1;
> https://github.com/apache/incubator-cordova-js/blob/master/lib/common/plugin/PositionError.js#L34
> https://github.com/apache/incubator-cordova-js/blob/master/lib/common/plugin/CompassError.js#L31
> W3C compatible code is:
> positionError = function(gpsError)
>    {
>         switch(gpsError.code)
>         {
>             case gpsError.PERMISSION_DENIED:
>                 errorMessage = "Access to GPS denied!";
>                 break;
> ...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message