You are here: Reference > JavaScript > client-side > HTML DOM > methods > sizeToContent (window)

sizeToContent method (window)

Browser support:
Fit the size of the current window to its contents.


object.sizeToContent ( );
You can find the related objects in the Supported by objects section below.

Return value:

This method has no return value.

Example HTML code 1:

This example illustrates the use of the sizeToContent method:
<button onclick="window.sizeToContent ();">Fit the size of the window to its contents!</button>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content