Origami Frontend Components & Services

Readme: o-autoinit

Auto initalise Origami components

Usage

This module comprises a standard way of firing the o.DOMContentLoaded and o.load events when their equivalent browser-native events fire, and will fire the Origami events even if the native ones have already been and gone, making this suitable for bundling with modules that are loaded asyncronously.

JavaScript

require('o-autoinit');

The autoinit module must be imported after all modules that bind to the initialisation events. If it is required more than once, subsequent requires will not have any effect, and the initialisation events may be emitted as early as the first require point.


Contact

If you have any questions or comments about this component, or need help using it, please either raise an issue, visit #ft-origami or email Origami Support.


Licence

This software is published by the Financial Times under the MIT licence.

Switch component view

GitHub Repository

Install o-autoinit

If using the Build Service, add o-autoinit@^1.5.1 to your script tag.

If running a Manual Build, run bower install --save "o-autoinit@^1.5.1".

Help & Support

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

Slack: #ft-origami
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: #ft-origami
Email: origami.support@ft.com