-
Notifications
You must be signed in to change notification settings - Fork 0
0.3.0 Tag
[new] T.Tag(...arguments: Array<TSelector|TAttributes>) => this;
Basic XML/XHML/HTML tags tools.
Not intended for use immediately! Only inheritance!
- ._name: TData
- .name(name: TData) => this
- ._attributes: TAttributes
- .attributes(attributes: TAttributes) => this
- .selector(selector: TSelector) => this
- ._renderTag(name: string, data: TData, attributes: TAttributes, callback: TCallback) => void
- ._render(callback: TCallback, context: TContext) => void
name
Inherited when expanding with .extend.
Contains tag name.
(name: TData) => this;
Set ._name option.
Optimized way to write code in line.
attributes
Inherited when expanding with .extend.
Contains tag attributes.
(attributes: TAttributes) => this;
Set ._attributes option.
Optimized way to write code in line.
(selector: TSelector) => this;
Parser of selector string. Please see TSelector rules.
Uses the method of passing Templates.parseSelector there ._attributes and argument selector.
render
(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.
Add support attributes and tag rendering.
System method.
Does not create a zone of visibility of context.
Not intended for manual use.
- TData: Renderer|sync|async|Mixin
- TCallback: (error, result) => void
- TSelector: string
- TInjector: () => void
- TAttributes: [name: string]: TData
- TContext: TData
Node.js:
var T = require('oswst');
Require.js:
define(['oswst'], function(T) {});
window
:
var T = window.oswst(_, async);
-
Templates
- .compile
- .include
- .render
- .renderContext
- .renderAttributes
- .renderSelector
- .sync
- .isSyncFunction
- .async
- .isAsyncFunction
- .Prototype()
- .Renderer > .Prototype
- .Data > .Renderer
- .data > .Data
- .Tag > .data
- .Single > .Tag
- .singles[string]
- .Double > .Tag
- .doubles[string]
- .Doctype > .Tag
- .doctypes[string]
- .xml > .Tag
- .Mixin > .Data
- .mixin > .Mixin
- .mixins[string]
- .Module > .Renderer
- .with