Hyunwoong Ji
Hyunwoong Ji

Reputation: 87

Minimizing web-browser using javascript

I have tried to minimize web-browser using javascript.

According to the document related to the issue, there is no way to do it.

However, I finally found the following document.

https://developer.mozilla.org/en-US/docs/Web/API/Window/minimize

When I tried call the function, window.minimize(), error statement came up:

Uncaught TypeError: window.minimize is not a function(…)

Is there way to minimize web-browser using javascript?

Upvotes: 0

Views: 1796

Answers (2)

Visveswaran
Visveswaran

Reputation: 41

There is no way to minimize the latest version of browser through JavaScript, because of the security reason, it won't work in latest browser..

we can only resize the browser but not to minimization level...

Here is the solution for the older browsers example (IE7), try the below post http://www.htmlgoodies.com/beyond/javascript/article.php/3471151/MinimizeMaximize-a-Browser-Window.htm#here

Upvotes: 1

shaochuancs
shaochuancs

Reputation: 16226

According to https://developer.mozilla.org/en-US/docs/Web/API/Window, window.minimize() is limited to "top-level XUL windows only". So it's only available when developing Firefox plugin.

There is no minimize() or similar method in window object (https://html.spec.whatwg.org/#the-window-object), it's unlikely to minimize browser using javascript on webpage.

Upvotes: 1

Related Questions