Skip to main content

ensemble.Snap

ensemble#

ensemble~Snap โ‡ _composition#

Snap is an empty skeleton composition with shorthands method and utils.

It is a wrapper around a DocumentFragment [DOM]. It could be used as base for abstraction of a custom component element.

Kind: inner class of ensemble
Extends: _composition

new Snap(ns)#

Constructor method.

ParamTypeDescription
nsstringComponent namespace

Example

new ensemble.Snap('namespace-of-my-foo-component');

snap._Symbol.toStringTag โ‡’ string#

Getter for Symbol property, returns the symbolic name for ensemble.Snap class.

Kind: instance property of Snap
See: Symbol.toStringTag
Todo

  • return undef
  • backward compatibility

snap._element(ns)#

Element wrapper.

Kind: instance method of Snap
See: document.createDocumentFragment()

ParamTypeDescription
nsstringComponent namespace

Snap.isSnap() โ‡’ boolean#

Check if passed object is an ensemble.Snap instance.

Kind: static method of Snap
Todo

  • backward compatibility