-
Notifications
You must be signed in to change notification settings - Fork 0
0.3.0 TSelector
Ivan S Glazunov edited this page Feb 20, 2015
·
2 revisions
string;
Simple string sintax for classes, id and attributes of tag.
Render with Templates.renderSelector.
With selector:
.class-name.withBig.letters.AndFromIt#Id1#Id2[attr1=http://link.without/quotes.png,attr2='http://link.with/single/quotes'][attr3="http://link.with/double/quotes",attr4'attr5' "attr6"][alt=#simple!]
Result TAttributes:
var attributes = {};
T.renderSelector = function(attributes, selector) {
class: 'class-name withBig letters AndFromIt',
id: 'Id2',
attr1: 'http://link.without/quotes.png',
attr2: 'http://link.with/single/quotes',
attr3: "http://link.with/double/quotes",
attr4: null,
"'attr5'": null,
'"attr6"': null,
alt: "#simple"
};
- 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