GlobalEventHandlers.onresize

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

Sintaxis

js
window.onresize = funcRef;

Parametros

  • funcRef es una referencia a una función.

Ejemplo

js
window.onresize = doFunc;
html
<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
# eventdef-window-resize