Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Element

Element is a very rudimentary Backbone like view layer. It allows the user to create a view, define events and perform actions on that view. Element relies on vanilla javascript to interact with the dom.

example:

var element = require('./element');

var hello = element({

    events: {
        'click .hello': 'hello'
    }

    initialize: function () {
        this.render();
    }

    makeHello: function () {
        this.hello = document.createElement('div');
        this.el.appendChild(hello);
    }

    render: function () {
        this.makeHello();
    }

    hello: function (e) {
        this.hello.innerText = 'hello';
    }

});


new Hello({el: document.getElementsByTagName('body')})

About

A javascript framework view layer that functions similar to backbone.

Resources

Releases

No releases published

Packages

No packages published