I want a button act like F11
(keyboard) in Google Chrome and like F10
in Firefox if the device is desktop only. I mean I want place a shortcut for my user so my user shouldn't press F11
he can click on the button instead F11
on the keyboard.
Asked
Active
Viewed 48 times
0

lurker
- 56,987
- 9
- 69
- 103

Mohammad Hady Karimi
- 15
- 4
-
Looks like a duplicate of https://stackoverflow.com/questions/7179535/set-window-to-fullscreen-real-fullscreen-f11-functionality-by-javascript – Wiktor Zychla Jun 19 '19 at 10:50
-
1Possible duplicate of [Set window to fullscreen (REAL fullscreen; F11 functionality) by javascript](https://stackoverflow.com/questions/7179535/set-window-to-fullscreen-real-fullscreen-f11-functionality-by-javascript) – Turnip Jun 19 '19 at 10:55
1 Answers
0
You can use the fullscreen api to get this result.
https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API
This allow you to request fullscreen for a given element.
Here is an example from w3schools:
https://www.w3schools.com/jsref/met_element_requestfullscreen.asp

Zackorrigan
- 178
- 1
- 10
-
"Here is an example from w3c:" - W3schools _are not the w3c_. They have no affiliation whatsoever. Don't fall for their misleading brand name. – Turnip Jun 19 '19 at 10:57
-