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

ASF GitHub Bot commented on CB-10277:
-------------------------------------

Github user vladimir-kotikov commented on a diff in the pull request:

    
https://github.com/apache/cordova-plugin-geolocation/pull/62#discussion_r48596423
  
    --- Diff: www/android/geolocation.js ---
    @@ -52,7 +62,20 @@ module.exports = {
               var geo = 
cordova.require('cordova/modulemapper').getOriginalSymbol(window, 
'navigator.geolocation');
               geo.clearWatch(args[0]);
             }
    -        exec(win, error, "Geolocation", "getPermission", []);
    +        var fail = function() {
    +            if (error) {
    +                error(illegalAccessError);
    +            }
    +        };
    +        exec(win, fail, "Geolocation", "getPermission", []);
         }
     };
     
    +// mimic PositionError to be compliant with W3C spec
    +var illegalAccessError = {
    --- End diff --
    
    Insead of creating custom object, can we reuse [PositionError 
polyfill](https://github.com/apache/cordova-plugin-geolocation/blob/master/www/PositionError.js)
 here?


> Error callback should be called w/ PositionError when location access is 
> denied
> -------------------------------------------------------------------------------
>
>                 Key: CB-10277
>                 URL: https://issues.apache.org/jira/browse/CB-10277
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Geolocation
>            Reporter: Sergey Grebnov
>            Assignee: Sergey Grebnov
>              Labels: Andriod, Triaged
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to