Skip to content

0.3.0 Tag

Ivan S Glazunov edited this page Feb 20, 2015 · 2 revisions

sources/tag

Templates.Tag

[new] T.Tag(...arguments: Array<TSelector|TAttributes>) => this;

Basic XML/XHML/HTML tags tools.

Not intended for use immediately! Only inheritance!


name

._name

TData;

Inherited when expanding with .extend.

Contains tag name.

.name

(name: TData) => this;

Set ._name option.

Optimized way to write code in line.


attributes

._attributes

TAttributes;

Inherited when expanding with .extend.

Contains tag attributes.

.attributes

(attributes: TAttributes) => this;

Set ._attributes option.

Optimized way to write code in line.

.selector

(selector: TSelector) => this;

Parser of selector string. Please see TSelector rules.

Uses the method of passing Templates.parseSelector there ._attributes and argument selector.


render

._renderTag

(name: string, data: TData, attributes: TAttributes, callback: TCallback => void;

This implementation does not perform any function.

The heir should be used as a method of assembling the tag.

._render

(callback: TCallback, context: TContext) => void;

Add support attributes and tag rendering.

System method.

Does not create a zone of visibility of context.

Not intended for manual use.

Clone this wiki locally