Skip to content

Instantly share code, notes, and snippets.

@tavriaforever
Created April 24, 2015 14:47

Revisions

  1. tavriaforever created this gist Apr 24, 2015.
    22 changes: 22 additions & 0 deletions ball.bemtree.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    block('ball')(
    def()(function () {
    var myFunc = function () {
    console.log('common function');
    };

    return applyNext({ _myFunc: myFunc });
    }),

    content()(function () {
    return {
    elem: 'el1',
    content: apply('ball-el1')
    };
    }),

    mode('ball-el1')(function () {
    var result = this._myFunc();

    return result;
    })
    );