We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

PositionOptions.timeout 属性是一个 long 型正数,它代表机器能够等待方法返回位置的最长时间(单位是毫秒)。预设值是 Infinity,这意味着 getCurrentPosition () 此方法在没有可用的位置前不会有任何回复。

语法

positionOptions.timeout = timeLength

规范

Specification Status Comment
Geolocation API
PositionOptions.timeout
Recommendation 初始定义

浏览器兼容性

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 5 3.5 (1.9.1) 9 10.60
未实现 15.0
16.0
5
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? 4.0 (4) ? 10.60 ?

相关链接

文档标签和贡献者

标签: 
此页面的贡献者: kameii
最后编辑者: kameii,