简体   繁体   English

Firefox:从网页强制全屏模式

[英]Firefox : Force full-screen mode from webpage

I am developing a web-based database that needs to be opened through firefox web browser(because of some css3 elements). 我正在开发一个基于Web的数据库,该数据库需要通过firefox Web浏览器打开(由于某些css3元素)。 I want the page to open automatically in full screen mode. 我希望页面以全屏模式自动打开。 I dont want the user of the database to have access to the firefox menu items 我不希望数据库的用户有权访问Firefox菜单项

Can't be done if you just have control of the webpage. 如果您仅能控制网页,则无法完成 Controls in the webpage cannot cause changes in the browser instance itself. 网页中的控件无法导致浏览器实例本身发生更改。

It would be a security issue if that were allowed. 如果允许的话,那将是一个安全问题。 You could look into writing a Firefox extension to do that, as they have more access to the browser instance itself. 您可以考虑编写一个Firefox扩展来做到这一点,因为他们可以访问浏览器实例本身。

You shouldn't look at trying to hide the firefox menu controls. 您不应该尝试隐藏Firefox菜单控件。 That seems like a flaw in your problem-solving approach. 这似乎是您解决问题的方法中的一个缺陷。

You will want to look at Fullscreen APIs of the browser. 您将要查看浏览器的全屏API。 If you accept a small request/info to the user in the application it can be done quite easily. 如果您在应用程序中向用户接受小的请求/信息,则可以轻松完成。 You just can't force the user into Fullscreen mode against his will. 您只是不能违反用户的意愿将其强制进入全屏模式。 This is good (for security reasons). 很好(出于安全原因)。

http://hacks.mozilla.org/2012/01/using-the-fullscreen-api-in-web-browsers/ http://hacks.mozilla.org/2012/01/using-the-fullscreen-api-in-web-browsers/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM