GlobalEventHandlers.onresize

La propiedad GlobalEventHandlers.onresize contiene un event handler desencadenado cuando un evento resize (en-US) es recibido.

Sintaxis

window.onresize = funcRef;

Parametros

  • funcRef es una referencia a una función.

Ejemplo

window.onresize = doFunc;
<html>
<head>

<title>onresize test</title>

<script type="text/javascript">

window.onresize = resize;

function resize()
{
 alert("resize event detected!");
}
</script>
</head>

<body>
<p>Resize the browser window to fire the resize event.</p>
</body>
</html>

Notas

El evento resize es activado después de que la ventana ha sido redimensionada.

Especificaciones

Specification
CSSOM View Module
# resizing-viewports