Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ResizeEvents

Index

Constructors

Methods

Constructors

constructor

Methods

Static addResizeListener

  • addResizeListener(el: HTMLElement, callback: Function): void
  • Add resize listener for the given element.
    Make sure that the given element is actually visible and has a valid size. Otherwise the listeners won't work.

    !!! Note !!!

    There are some things which need to be considered when using this method:

    • addResizeListener adds some elements to the DOM of the element which should be observed

      • Check carefully if those changes to the inner DOM don't effect anything
      • If the inner DOM structure of the element to observe is manually changed after adding the listener it could easily break the listener
    • Even though this should completely work event based (without polling etc) it's only a polyfill and should be used carefully and only if really necessary

    Parameters

    • el: HTMLElement
    • callback: Function

    Returns void

Generated using TypeDoc