Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Window.resizeBy()

Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите закончить эту работу!

Summary

Resizes the current window by a certain amount.

Syntax

window.resizeBy(xDelta, yDelta) 

Parameters

  • xDelta is the number of pixels to grow the window horizontally.
  • yDelta is the number of pixels to grow the window vertically.

Example

// shrink the window 
window.resizeBy(-200, -200);

Notes

This method resizes the window relative to its current size. To resize the window in absolute terms, use window.resizeTo.

Since Firefox 7, it's no longer possible for a web site to change the default size of a window in a browser, according to the following rules:

  1. You can't resize a window or tab that wasn’t created by window.open.
  2. You can't resize a window or tab when it’s in a window with more than one tab.

Specifications

Specification Status Comment
CSS Object Model (CSSOM) View Module
The definition of 'window.resizeBy()' in that specification.
Working Draft  

Метки документа и участники

 Внесли вклад в эту страницу: cvrebert, fscholz, teoli, iamanupmenon, ethertank, Sheppy, Mgjbot, Ptak82, Dria, JesseW
 Обновлялась последний раз: cvrebert,