Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 当位置不可用时,Chrome是否违反HTML5地理位置API标准?_Css_Html_Google Chrome_W3c Geolocation - Fatal编程技术网

Css 当位置不可用时,Chrome是否违反HTML5地理位置API标准?

Css 当位置不可用时,Chrome是否违反HTML5地理位置API标准?,css,html,google-chrome,w3c-geolocation,Css,Html,Google Chrome,W3c Geolocation,当我开发一个web应用程序时,我正在使用HTML5地理定位API。我已完成以下步骤: 我关闭了桌面电脑上的WiFi连接 我通过以下方式触发了职位申请: var params = {enableHighAccuracy: true, timeout:3600, maximumAge:60000}; navigator.geolocation.getCurrentPosition( reportPosition, gpsError, params ); 我使用Google Chrome浏览器[v

当我开发一个web应用程序时,我正在使用HTML5地理定位API。我已完成以下步骤:

  • 我关闭了桌面电脑上的WiFi连接
  • 我通过以下方式触发了职位申请:

    var params = {enableHighAccuracy: true, timeout:3600, maximumAge:60000};
    navigator.geolocation.getCurrentPosition( reportPosition, gpsError, params );
    
  • 我使用Google Chrome浏览器[version 41.0.2272.89(64位)]运行HTML代码,发现
    gpsError
    函数被调用了两次。第一次我收到一个错误代码
    位置不可用
    ,这对我来说很有意义,因为连接已断开。但令人惊讶的是,我发现第二次的错误代码是
    TIMEOUT

  • 我在Safari[版本8.0.4(10600.4.10.7)]上运行了相同的代码,只调用了一次
    gpsError
    函数,错误代码
    POSITION\u不可用

  • 我打开地理定位,发现了以下步骤:

  • 但在第节中,它陈述了以下内容:

    因此,我猜chrome违反了地理定位API的标准,因为在知道POSITION不可用的事实后,使用
    超时调用错误回调对我来说没有意义,即使用
    POSITION\u UNAVAILABLE调用错误回调

    chrome和safari哪一款被认为符合标准