久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<i id='jDBT6'><tr id='jDBT6'><dt id='jDBT6'><q id='jDBT6'><span id='jDBT6'><b id='jDBT6'><form id='jDBT6'><ins id='jDBT6'></ins><ul id='jDBT6'></ul><sub id='jDBT6'></sub></form><legend id='jDBT6'></legend><bdo id='jDBT6'><pre id='jDBT6'><center id='jDBT6'></center></pre></bdo></b><th id='jDBT6'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='jDBT6'><tfoot id='jDBT6'></tfoot><dl id='jDBT6'><fieldset id='jDBT6'></fieldset></dl></div>

          <bdo id='jDBT6'></bdo><ul id='jDBT6'></ul>

      1. <small id='jDBT6'></small><noframes id='jDBT6'>

      2. <tfoot id='jDBT6'></tfoot>

        <legend id='jDBT6'><style id='jDBT6'><dir id='jDBT6'><q id='jDBT6'></q></dir></style></legend>

        如何檢測用戶對地理位置的負面反應

        How to detect negative user response for geolocation(如何檢測用戶對地理位置的負面反應)

            <tfoot id='vEU7K'></tfoot>
              <i id='vEU7K'><tr id='vEU7K'><dt id='vEU7K'><q id='vEU7K'><span id='vEU7K'><b id='vEU7K'><form id='vEU7K'><ins id='vEU7K'></ins><ul id='vEU7K'></ul><sub id='vEU7K'></sub></form><legend id='vEU7K'></legend><bdo id='vEU7K'><pre id='vEU7K'><center id='vEU7K'></center></pre></bdo></b><th id='vEU7K'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='vEU7K'><tfoot id='vEU7K'></tfoot><dl id='vEU7K'><fieldset id='vEU7K'></fieldset></dl></div>
                <tbody id='vEU7K'></tbody>
            • <legend id='vEU7K'><style id='vEU7K'><dir id='vEU7K'><q id='vEU7K'></q></dir></style></legend>

                  <bdo id='vEU7K'></bdo><ul id='vEU7K'></ul>
                • <small id='vEU7K'></small><noframes id='vEU7K'>

                • 本文介紹了如何檢測用戶對地理位置的負面反應的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  使用geolocation API的navigator.geolocation.getCurrentPosition()如何處理否定響應?

                  When using geolocation API's navigator.geolocation.getCurrentPosition() how to deal with a negative response?

                  表示出現錯誤時調用第二個回調函數.但是,當用戶通過取消請求來選擇不透露他的位置時,該函數永遠不會被觸發.

                  It says that the second callback function is called when there is an error. However when user chooses not to reveal his location by cancelling the request that function is never fired.

                  似乎 getCurrentPosition() 無限期地等待答案.(至少在 Firefox 4 中)

                  It seems that getCurrentPosition() waits for an answer indefinitely. (at least in Firefox 4)

                  我如何知道用戶何時按下取消(或否等)

                  How can I know when user presses cancel (or no etc.)

                  有什么想法嗎?

                  推薦答案

                  見下方編輯
                  你是對的,當用戶拒絕位置請求時,錯誤處理程序應該觸發.傳遞給錯誤處理程序的錯誤對象應包含錯誤代碼和消息,讓您知道用戶拒絕了請求.但是,從位置請求對話框中選擇選項 Not Now 時,我在 FF4 中沒有看到這一點.

                  See edit below
                  You are correct, the error handler should fire when a user denies the location request. The error object passed into the error handler should contain an error code and message letting you know the user denied the request. However, I'm not seeing this in FF4 when selecting the option Not Now from the location request dialogue.

                  在 Chrome 中,API/回調完全按預期工作,但在 Chrome 中沒有第三個選項.

                  In Chrome, the API/callbacks work exactly as expected, but in Chrome there is no 3rd option.

                  編輯
                  啊,好吧,我在 FF4 中的這種行為中發現了一個小怪癖.在普通模式下(非隱私瀏覽),用戶將看到 3 個選項:

                  EDIT
                  Ahhh okay I found a little quirk in the behavior of this in FF4. In normal mode (not private browsing), the user will be presented 3 options:

                  • 永遠分享
                  • 從不分享
                  • 現在不行

                  Never share 會正確觸發錯誤處理程序,但 Not Now 不會.

                  這是什么意思以及如何處理?

                  Never share triggers the error handler correctly, but Not Now does not.

                  What does this mean and how to handle it?

                  好吧,看起來如果用戶點擊Not Now,您將不會得到響應.因此,我將設置一個超時來檢查將由其中一個處理程序設置的標志.如果未設置此標志(意味著處理程序未在分配的時間內觸發),您可以執行以下兩種操作之一:

                  Well, it looks like if the user hits Not Now, you aren't going to get a response. Therefore, I would set a timeout which checks a flag that would be set by one of the handlers. If this flag is not set (meaning the handlers didn't fire in the allotted time), you can do one of two things:

                  1. 假設用戶拒絕了請求(即使拒絕是暫時的)
                  2. 您可以再次請求用戶許可(通過相同的調用),然后用戶將再次看到該對話框.

                  選項 2 的可用性可能很差(而且很煩人),因此最好假設他們暫時拒絕并在下次訪問該網站時再次詢問(禮貌!).

                  Option 2 is probably bad usability (and annoying), so it is probably best to assume they denied temporarily and ask them again (politely!) the next time they visit the site.

                  我創建了一個 JsFiddle 來玩這個 API:

                  I created a JsFiddle to play around with this API:

                  http://jsfiddle.net/7yYpn/11/

                  這篇關于如何檢測用戶對地理位置的負面反應的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Use IScroll in Angular 2 / Typescript(在 Angular 2/Typescript 中使用 IScroll)
                  anime.js not working in Ionic 3 project(Anime.js 在 Ionic 3 項目中不起作用)
                  Ionic 3 - Update Observable with Asynchronous Data(Ionic 3 - 使用異步數據更新 Observable)
                  Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
                  In Ionic 2, how do I create a custom directive that uses Ionic components?(在 Ionic 2 中,如何創建使用 Ionic 組件的自定義指令?)
                  Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(將 ViewChild 用于動態元素 - Angular 2 amp;離子2)

                  <small id='ur9bW'></small><noframes id='ur9bW'>

                      • <bdo id='ur9bW'></bdo><ul id='ur9bW'></ul>

                        <i id='ur9bW'><tr id='ur9bW'><dt id='ur9bW'><q id='ur9bW'><span id='ur9bW'><b id='ur9bW'><form id='ur9bW'><ins id='ur9bW'></ins><ul id='ur9bW'></ul><sub id='ur9bW'></sub></form><legend id='ur9bW'></legend><bdo id='ur9bW'><pre id='ur9bW'><center id='ur9bW'></center></pre></bdo></b><th id='ur9bW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ur9bW'><tfoot id='ur9bW'></tfoot><dl id='ur9bW'><fieldset id='ur9bW'></fieldset></dl></div>
                        <legend id='ur9bW'><style id='ur9bW'><dir id='ur9bW'><q id='ur9bW'></q></dir></style></legend>
                            <tbody id='ur9bW'></tbody>
                          • <tfoot id='ur9bW'></tfoot>
                            主站蜘蛛池模板: 国产成人精品一区二区三区在线观看 | www狠狠爱com| 亚洲男人的天堂网站 | 国产一区高清 | 亚洲a视 | 久久国产日韩欧美 | 免费视频一区二区 | 91精品一区二区三区久久久久 | 岛国av在线免费观看 | 免费在线一区二区 | 欧美一级片在线 | 日韩精品中文字幕一区二区三区 | 欧美美女一区二区 | 国产成人免费 | 国产乱码高清区二区三区在线 | 亚洲免费视频网站 | 欧洲尺码日本国产精品 | 欧美日韩国产不卡 | 国产精品伦一区二区三级视频 | 中文字幕在线播放不卡 | 国产精品福利一区二区三区 | 福利视频一区二区三区 | 中文字幕精品一区久久久久 | 国产精品二区三区 | 日韩在线视频免费观看 | 久色一区 | 91免费看片 | 中国美女一级黄色片 | 在线不卡视频 | 91精品国产乱码久久久久久久久 | 久久国产日韩欧美 | 成人福利视频网站 | 超级乱淫av片免费播放 | 玖玖玖av| 久久在线视频 | 国产成人jvid在线播放 | 国产精品网址 | 日本在线观看网址 | 蜜臀久久 | 欧美高清视频 | 狠狠艹|