Origami Frontend Components & Services

JSDoc: o-comments

new Count(countEl, opts)

Class constructor.

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

Links

new Stream(streamEl, opts)

Class constructor.

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

Methods

Links

Comments.getDataAttributes(rootEl)

Static Method

Get the data attributes from the element. If the component 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

Returns

  • Object - - Data attributes as an object

Links

Comments.init(rootEl, opts)

Static Method

Initialise the 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

Returns

  • Comments | Array.<Comments> - - Comments instance(s)

Links

Stream#publishEvent(name, data)

Instance Method

Emits events that have a valid o-comment event name.

parameter type default description
name String The event name
data Object The event payload

Links

Support Status
active
Switch component view

GitHub Repository

Install o-comments

If using the Build Service, add o-comments@^7.1.0 to your script and link tags.

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

Help & Support

o-comments is maintained directly by the Origami team. If you have any questions about o-comments 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