Component

Component class.

new Component($0: Object, options: Object)
License: {@link https://opensource.org/licenses/MIT|MIT}
Author: Patrick Heng & Fabien Motte <hengpatrick.pro@gmail.com / contact@fabienmotte.com>
Parameters
$0 (Object = {})
Name Description
$0.el any (default null)
$0.name any (default 'anonymous')
$0.components any (default {})
options (Object = {}) Options.
Example
const rootComponent = new Component({ el: '#root' })
Instance Members
$el
$name
$parent
$root
$els
$refs
$props
init()
mounted()
beforeDestroy()
destroyed()
data()
$preRenderMount(el)
$mount(el, type)
$destroy()
$debug()
$scope(methods)
$nextTick(callback)
template
components

startsWith

Starts with.

startsWith
Parameters
str (String) String.
prefix (String) Prefix.
Returns
Boolean: True if given string starts with given prefix, else otherwise.

walk

Walk a DOM node and call the given callback.

walk(nodes: any, cb: Function, node: HTMLElement)
Parameters
nodes (any)
cb (Function) Callback function.
node (HTMLElement) HTMLElement node.