Ractive.getNodeInfo()

edit this page

Sometimes it is useful to know which Ractive instance a DOM node is attached to and the details of where it exists in the view. Ractive.getNodeInfo() is a static method that exposes this information based on Ractive's internal tracking mechanisms.

This is particularly useful for decorators.

Ractive.getNodeInfo( node )

Returns an object with a reference to the Ractive instance, the keypath in the view, and any indices that are available from the view. { ractive: instance, keypath: keypath, index: indices }

node DOMNode

The DOM node for which you wish to retrieve the Ractive instance or view details.