Global

Methods

createElement2(elementDescription) → {Element}

Creates an element with elementDescription
Parameters:
Name Type Description
elementDescription object tagName key is required
Source:
Returns:
Type
Element

idFromEvent() → {string}

Parameters:
Type Description
Event
Source:
Returns:
dataId string
Type
string

leafIndex(scope) → {number}

Parameters:
Name Type Description
scope string
Source:
Returns:
leafIndex
Type
number

leafName(scope) → {string}

Parameters:
Name Type Description
scope string
Source:
Returns:
leafName
Type
string

parentScope(scope) → {string}

parentScope
Parameters:
Name Type Description
scope string
Source:
Returns:
parentScope
Type
string

scopeFromArray(scopeIn) → {string}

scopeFromArray joins paths to create a valid path to use with d.variables[path] d.elements[path]
Parameters:
Name Type Description
scopeIn array
Source:
Returns:
path
Type
string

scopeFromElement(element) → {string|undefined}

Parameters:
Name Type Description
element Element
Source:
Returns:
scope
Type
string | undefined

scopeFromEvent(event) → {string|undefined}

scopeFromEvent gets the starting path for an event issued inside a component in combination with scopeFromArray it allows to access sibling elements and variables d.functions.clickedButton = (event) => { d.elements[d.scopeFromArray([scopeFromEvent(event), `other`])] .classList.add(`active`); };
Parameters:
Name Type Description
event Event
Source:
Returns:
scope
Type
string | undefined