Origami Frontend Components & Services

JSDoc: o-comments

o-comments is not maintained by the Origami team. While this component may be used, we make no guarantees about the support status, though we will help if we can.

new Comments(oCommentsEl, opts)

Class constructor.

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

Methods

Links

Comments.getDataAttributes(oCommentsEl)

Static Method

Get the data attributes from the CommentsElement. If the component is being set up declaratively, this method is used to extract the data attributes from the DOM.

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

Returns

  • Object - - Data attributes as an object

Links

Comments#on(event, callback)

Instance Method

Register callback functions to events.

parameter type default description
event String The event to be tracked
callback function The callback for when the event is emitted

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

new Comments(oCommentsEl, opts)

Class constructor.

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

Methods

Links

Switch component view

GitHub Repository

Install o-comments

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

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

Help & Support

o-comments is not supported directly by the Origami team. We make no guarantees, but will help if we can. First try contacting its maintainers at:

Slack: #YOUR-SLACK-CHANNEL
Email: YOUR-TEAM@ft.com