-
Notifications
You must be signed in to change notification settings - Fork 0
0.2.2 u selector
Ivan S Glazunov edited this page Feb 20, 2015
·
3 revisions
All tags may take arguments on the first call, in the first parentheses.
TSelector describes the type selector.
When processing changes the ._attributes.
For ease of, all the tags available method .selector, streaming changes.
var d = div({ class: 'first', key: 'value' })();
d.selector('.second[key=other]');
console.log(d._attributes); // { class: 'first second', key: 'other' }
When extended attributes are applied. Exception - classes, they added.
Usually, all tags can called with a selector of the first pair of brackets.
div('.second[key=other]')().render(console.log) // <div class="second" key="other"></div>
img('.second[key=other]').render(console.log) // <img class="second" key="other"/>
doctype.html('.second[key=other]').render(console.log) // <!DOCTYPE html class="second" key="other"/>
- 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