-
Notifications
You must be signed in to change notification settings - Fork 0
0.2.1 el Tag
[new] (...arguments: Array<TSelector|IAttributes>) => this;
- Provides tags with attributes without views.
var Tag = Templates.Tag;
var tag = Tag('.class.name#id').name('div');
console.log(tag._name); // div
console.dir(tag._attributes) // { class: "class name" id: "id" }
Inherited when expanding with .extend.
(name: TData) => this;
Set _name option in flow.
var instance = Tag();
instance.name('div');
Contains attributes this tag.
Inherited when expanding with .extend.
All sended attributes overlap, not added. Exception - sended to the .selector classes are added, do not overlap.
(attributes: IAttributes) => this;
Merge ._attributes with argument attributes.
(callback: TCallback) => void
Render ._attributes to string
.
(selector: TSelector) => this;
Parser of selector string. Please see TSelector rules.
Uses the method of passing .parseSelector there ._attributes and argument selector
.
All sended attributes overlap, not added. Exception - sended to the .selector classes are added, do not overlap.
- 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