国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - js Make Google Chrome maximize instead of full screen (F11)
給我你的懷抱
給我你的懷抱 2017-05-19 10:37:01
0
2
1069

js Maximize Google Chrome instead of full screen (F11)

給我你的懷抱
給我你的懷抱

reply all(2)
黃舟

Theoretically, js supports

window.resizeTo( screen.availWidth, screen.availHeight );

But in fact, each browser has different restrictions on this kind of behavior. Just imagine that you open a page and the page is directly made into full screen. That is very sad.
Similarly restricted, there are also windows .open, continuous pop-up alerts, etc.
This is the page permission.

There are also browser permissions. If you are developing a chrome extension, you should not be restricted

Additional point: Different similar trigger situations may have different results. Self-execution will have more restrictions, such as
document.body.onload = function() {
video.play()
};
Playing a video directly as soon as you enter the page is very frustrating. Some browsers restrict this type of behavior and can only use triggering:
document.body.onclick = function() {

video.play(); // 這就不受影響

};

淡淡煙草味
function launchFullscreen(element) {
  if(element.requestFullscreen) {
    element.requestFullscreen();
  } else if(element.mozRequestFullScreen) {
    element.mozRequestFullScreen();
  } else if(element.msRequestFullscreen){
    element.msRequestFullscreen();
  } else if(element.webkitRequestFullscreen) {
    element.webkitRequestFullScreen();
  }
}

launchFullscreen(document.documentElement);

You can refer here to learn more: http://javascript.ruanyifeng....

However, for operations such as changing the browser size, position, and full screen, the browser believes that this should be decided by the user rather than the website developer, so this type of code is blocked by default.
A similar prompt will appear:

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template