0

I have been working to create several simple games using just some javascript/css, geared toward use by touchscreen devices. I am wanting to simulate a native app experience on tablets, without bogging down the devices as some of the javascript being used may get RAM intensive.

What I am wondering is if there is a way to push the browser frame to fullscreen mode, in order to prevent accidental taps to the addressbar/back button/ etc. I have thought about just using a dialog to prompt user to f11 to fullscreen, but as most of these games are triggered on timeouts, I would rather not have to have a bunch of popups instructing the user to search for buttons and such.

I don't want to lock them out of their browsers functions, just would like to start the games like a native app. I would prefer to do this without the use of jquery or other plugins/APIs.

Is this possible? Am I likely to trigger anti-virus or other browser protections? Any feedback is much appreciated.

Thomas Cheney
  • 388
  • 3
  • 11
  • It is related, but in that post most responses were geared toward IE/Firefox/Chrome, where what I was hoping to acheive would be a web interface that functions like a native app on Android/Apple/etc touchscreen tablets. I also, in order to keep load times to a minimum, was hoping to achieve it without the need of API's or code libraries, as some of the Javascript I am writing may get memory-intensive at times, and tablets rarely have huge ammount of RAM to dedicate to the extra frameworks. – Thomas Cheney Dec 08 '13 at 16:20
  • 1
    There are answers that point to the fullScreen API https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode?redirectlocale=en-US&redirectslug=Web%2FGuide%2FDOM%2FUsing_full_screen_mode and if you are looking for a device native thing you should include that in the question and tags. – rlemon Dec 08 '13 at 16:21
  • The native API is exactly for this purpose. Alternatively, you could consider making your web-app available as a hybrid app with e.g. Apache Cordova. This would make fullscreen pretty easy, too. But if you truly want to stay in the web, the fullscreen API is the way to go. – Ingo Bürk Dec 08 '13 at 16:22
  • Looked over the API specs, the examples given all point to video content, and seem to have pretty serious limitations, Cordova may be the way to go. Was looking for a way to avoid compiling apps for different devices, to create just a single web-accessible demi-app that could be used both by desktop and tablets, but I may just be hoping for too much at this point. Thanks for the input. – Thomas Cheney Dec 08 '13 at 16:35

0 Answers0