-
Notifications
You must be signed in to change notification settings - Fork 0
0.2.0 theory singles
Ivan S Glazunov edited this page Feb 20, 2015
·
2 revisions
theory about singles
Ready-to-use double tags. Full documentation.
br
hr
img
input
base
frame
link
meta
style
Getting from the collection Templates.singles:
var img = Templates.singles.img, br = Templates.singles.br;
img(/* string selectors and object attributes */)
img('.radius[src=image.png]')
.render(function(result) {
console.log(result);
});
<img class="radius" src="image.png"/>
div('.container')(
img, // short
img('.radius[src=image.png]') // full
).render(console.log);
<div class="container">
<img/>
<img class="radius" src="image.png"/>
</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