gagoar edited this page Nov 11, 2014 · 4 revisions

#Dorsal Properties

  • Dorsal.VERSION string - current Version
  • Dorsal.DATA_PREFIX DATA_PREFIX - prefix for attributes used by Dorsal
  • Dorsal.DATA_DORSAL_WIRED DATA_DORSAL_WIRED - data attribute used for internal management
  • Dorsal.GUID_KEY GUID_KEY - data attribute added to each element wired
  • Dorsal.CSS_PREFIX CSS_PREFIX - prefix for any wirable pluginName

##Dorsal.unregisterPlugin(pluginName) unregister a given plugin

Params

  • pluginName string - Plugin Name

##Dorsal.registeredPlugins() will return each plugin name registered

Returns: Array - registered plugin names
##Dorsal.unwire(el, pluginName) will remove a given el/pluginName

Params

  • el DomNode - node already wired.
  • pluginName String - plugin Name to uwire.

Returns: Boolean - true if a plugin was detached, false otherwise
##Dorsal.wire(el, pluginName) wire node/nodes wire can be used as follow:

  • 0 argument: Will wire each element having the prefix on them.
  • 1 argument (node): Will wire all the children elements from a given node.
  • 1 argument (Array): Will wire all the elements from a given Collection.
  • 2 argument (DomNode, PluginName): Will wire the node/plugin respectively.

Params

  • el DomNode | Array.<DomNode> - a given element or Array to wire
  • pluginName String - plugin name to wire

Returns: Promise - deferred async wiring of dorsal
##Dorsal.rewire(el, pluginName) will remove and re initialize a given node/plugin

Params

  • el DomNode - node to rewire
  • pluginName stirng - plugin Name

Returns: Promise - deferred async wiring of dorsal
##Dorsal.get(nodes) will return instances wired to a given node/s

Params

  • nodes Array.<DomNode> - nodes given

Returns: Array - all object instances stored for given node/s

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.