Skip to content

zakstal/element

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published