document.body.requestFullscreen()
Run this function
then the document's scrollbar is hided and Invalid mouse scrolling
after call requestFullscreen()
document.body.requestFullscreen()
document.body.requestFullscreen()
You do not have the required permissions to view the files attached to this post.
- salvadordf
- Posts: 4125
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: document.body.requestFullscreen()
Hi,
The embedded web browser decides when a scrollbar is needed.
Use the TWVBrowser.OnContainsFullScreenElementChanged event to detect when an HTML element inside the WebView requested the fullscreen mode :
https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.1418.22#add_containsfullscreenelementchanged
The TWVBrowser.ContainsFullScreenElement property indicates if the WebView contains a fullscreen HTML element.
https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.1418.22#get_containsfullscreenelement
Depending on the framework you use (FMX, VCL or LCL) you should set the TForm.FullScreen property accordingly, or resize the form and hide or show the window borders, caption and system buttons.
The embedded web browser decides when a scrollbar is needed.
Use the TWVBrowser.OnContainsFullScreenElementChanged event to detect when an HTML element inside the WebView requested the fullscreen mode :
https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.1418.22#add_containsfullscreenelementchanged
The TWVBrowser.ContainsFullScreenElement property indicates if the WebView contains a fullscreen HTML element.
https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.1418.22#get_containsfullscreenelement
Depending on the framework you use (FMX, VCL or LCL) you should set the TForm.FullScreen property accordingly, or resize the form and hide or show the window borders, caption and system buttons.