node package manager


Δt selector engine - async & dynamic templating engine

Δt Selector Engine

This is a selector engine for Δt.

$ npm install dt-selector
var $ = require('dt-selector');
var example = new Template({schema:5}, function() {
    this.$html(function() {
        this.$head(function() {
        this.$body(function() {
            this.$div({class:'a'}, "¡¡¡");
            this.$div({class:'b'}, function() {
            this.$div({class:'a'}, "!!!");
$(example).on('.b span', function (el) {
    el.once('end', function () {
/* → stdout:

Same like nodejs' EventEmitter, instead that the given event name gets processed by a CSS selector parser. Every time a new tag is created in the xml tree, the matching event will be emitted with the tag as argument.

Since Templates, Builder and Tags have all the same event api for new tags, it doesn't matter if you let the selector listen on the template or on a tag.