Visit Mozilla.org

DOM:window.resizeTo

From MDC

« Gecko DOM Reference

Contents

[edit] Summary

Dynamically resizes window.

[edit] Syntax

window.resizeTo(iWidth, iHeight) 

[edit] Parameters

  • iWidth is an integer representing the new width in pixels.
  • iHeight is an integer value representing the new height in pixels.

[edit] Example

 // function resizes the window to take up one quarter
 // of the available screen.
 function quarter() {
   window.resizeTo(window.screen.availWidth/2,
      window.screen.availHeight/2);
 }

[edit] Notes

See also window.resizeBy.

[edit] Specification

DOM Level 0. Not part of specification.