Skip to main content

Home > @jsplumbtoolkit/templates > Knockle

Knockle class#

Signature:

export declare abstract class Knockle 

Constructors#

ConstructorModifiersDescription
(constructor)(options, registerGlobalTag, getGlobalTag)Constructs a new instance of the Knockle class

Properties#

PropertyModifiersTypeDescription
_fnPreamblestring
_fnSuffixstring
attributesReRegExp
bindingsDictionary<Binding>
cacheMap<string, any>
closeReRegExp
commentReRegExp
customTagsDictionary<CustomTag>
defaultTemplatestring
entriesDictionary<AbstractEntry>
executionsDictionary<Execution>
inlineIfReRegExp
isBrowserboolean
namespaceHandlersDictionary<(tag: string) => string>
namespacesDictionary<string>
openCloseReRegExp
openReRegExp
singleExpressionReRegExp
templateCacheMap<string, any>
templateResolverTemplateResolver
tokenizerReRegExp
updatersDictionary<Array<Function>>

Methods#

MethodModifiersDescription
_compileSingle(fb)
_executeSingle(fb, data)
_getDefaultTemplateResolver()
addCommand(executionId, el, command, action)Add a command - this is called during execution of a template. See pushCommands below.
addTemplate(id, content)
bind(fromObj, id)
ce(tag)Create an element for the current environment
cf()Create a Fragment for the current environment
clearCache()
compile(ast, precompileOnly, functionBodyOnly, isCustomScope)
copyChildNodes(from, to)
ctn(value)Create a text node for the current environment
customTagRendered(tagName, el, data)
data(inObj, path, value)
each(l, fn, loopUuid, ctx, key)
getCustomTag(tagName)
getExecutionContent(content, uuid, isTextNode, namespace)
getTemplate(id)
nec()
onUpdate(el, fn)
parse(str, templateResolver, extraProperties, parseIdStack)
parseAttributes(el)
peek(stack)
pet(eid)
pushCommands(executionId, el)At the end of an execution this is called - any commands found during the execution are transferred to the fragment that was created.
registerTag(tagName, handlers, isGlobal)
remove(el, removeFromDOM)Removes the given element from this Knockle instance, and optionally removes it from the DOM too.
resolveTemplate(id)
setAttribute(el, a, v)
te(el, eid, entryId, loopIndex)
template(id, data, templateResolver, forceReload)
update(el, data)
updateFrom(entry, newEntry, parent)