-
Notifications
You must be signed in to change notification settings - Fork 0
0.2.1 theory attributes
Ivan S Glazunov edited this page Feb 20, 2015
·
2 revisions
With attributes are working double and single tags.
- When you inherit the attributes overlap.
- Exception: classes, they are added at inheritance.
- You can use a .
- In processing is converted into IAttributes
As TSelector
div('[attr1="value1" attr2=value2, "attr3"]',"[attr4=value4]['attr5' attr6]")()
.render(console.log);
<div attr1="value1" attr2="value2" "attr3" attr4="value4" 'attr5' attr6></div>
- The separator can be put spaces or commas.
As IAttributes
div({ attr1: 'value1', attr2: 'value2', '"attr3"': null }, { attr4: 'value4', "'attr5'": null, attr6: null })()
.render(console.log)
<div attr1="value1" attr2="value2" "attr3" attr4="value4" 'attr5' attr6></div>
- 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