Avoid user notification message for Pointer Lock API

305 views
Skip to first unread message

sumesh s

unread,
Feb 19, 2021, 12:52:01 PM2/19/21
to Chromium-discuss
Hi,

When I used pointer lock JavaScript API, a user notification message displayed in Chromium browser (Chrome & Microsoft Edge). Please see the below reference link.


Can I possible to do call pointer lock API (requestPointerLock()) without showing the "Press ESC to show your cursor" notification message?

2021_02_19_11_47_39_Pointer_lock_demo.png

Thanks & Regards
Sumesh S

PhistucK

unread,
Feb 19, 2021, 12:54:00 PM2/19/21
to mailtos...@gmail.com, Chromium-discuss
Are you asking whether a website can circumvent a security feature? No, it cannot.
If you are asking whether you can customize Chromium in order not to show this message, you will have to change some C++ code.

PhistucK


--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

sumesh s

unread,
Feb 19, 2021, 4:39:54 PM2/19/21
to PhistucK, Chromium-discuss
Hi PhistucK,

Thanks for your reply!

On our website, we hide the mouse pointer to do an action by calling the "requestPointerLock" javascript API. After completing the action execution, we explicitly call "exitPointerLock" API to release the pointer lock. In between, users don't want to see the notification message.

I am asking if it is possible to hide the notification message in some other way. I understand your answer, it makes sense.

I have no plan to customize the Chromium in order to achieve this.

Thanks
Sumesh S


Reply all
Reply to author
Forward
0 new messages