Origami Frontend Components & Services

JSDoc: o-lazy-load

new LazyLoad(rootEl, opts)

Class constructor.

parameter type default description
rootEl (optional) HTMLElement The component element in the DOM
opts (optional) Object {} An options object for configuring the component

Methods

  • getDataAttributes(rootEl) - (static) Get the data attributes from the ${name.titleCase}Element. If the message is being set up declaratively, this method is used to extract the data attributes from the DOM.
  • init(rootEl, opts) - (static) Initialise component.

Links

LazyLoad.getDataAttributes(rootEl)

Static Method

Get the data attributes from the ${name.titleCase}Element. If the message is being set up declaratively, this method is used to extract the data attributes from the DOM.

parameter type default description
rootEl HTMLElement The component element in the DOM

Links

LazyLoad.init(rootEl, opts)

Static Method

Initialise component.

parameter type default description
rootEl HTMLElement | String The root element to intialise the component in, or a CSS selector for the root element
opts (optional) Object {} An options object for configuring the component

Links

Status
active Origami v2.0
Switch component view

GitHub Repository

Install o-lazy-load

If using the Build Service, add o-lazy-load@^3.0.0-beta.0 to your script and link tags.

If running a Manual Build, run npm install "o-lazy-load@^3.0.0-beta.0".

Help & Support

o-lazy-load is maintained directly by the Origami team. If you have any questions about o-lazy-load or Origami in general, we are happy to help. 😊

Slack: #origami-support
Email: origami.support@ft.com

Feedback / Issues

To report a bug or request features please create an issue on Github. For support or general feedback please get in touch 😊

Slack: #origami-support
Email: origami.support@ft.com