GeoLocation 地理信息
navigator.geolocation.getCurrentPosition(fnSuccess,fnError)
ev.coords->longitude 緯度 ? ? ? ? ?latitude ?經(jīng)度
ev.code :
0 ? ?未知錯誤
1 ? ?用戶拒絕
2 ? ?獲取失敗
3 ? ?超時
ev.message
getCurrentPosition ?獲取一次
watchPosition ? 相當(dāng)于定時器 一直監(jiān)控
例子: ?百度地圖
WebWorker
單線程:一件事沒有執(zhí)行完 不能干后面的事箱季。
多線程:一件事沒有干完的時候 ?能干別的事藏雏。
主線程:DOM 創(chuàng)建 ? ? css 渲染 ? ?js修改作煌。
子線程:計算。
注意:
1最疆、子線程能進(jìn)行計算 但不能DOM BOM 操作蚤告。
2、子線程不能跨域获诈。
3心褐、子線程不能套子線程。
4逗爹、子線程不和主線程共享數(shù)據(jù),而是復(fù)制挟冠,哪怕是對象袍睡。
重力感應(yīng)
DeviceMotionEvent
accelerationIncludingGravity
高級運(yùn)動
animation ?復(fù)雜運(yùn)動
animate.css
官網(wǎng):https://daneden.github.io/animate.css/