UNPKG

halo

Version:

Keeping your Backbone.js straight with Socket.io

32 lines (24 loc) 616 B
"use strict"; var Origin = require('origin'); var und = require('underscore'); var Model = require('../model.js').Model; var Collection = require('../collection').Collection; var View = Origin.Responder.extend({ initializer : function(name) { this.parent(Origin.Responder).constructor(name); this.name = name || this.name; if (!this.name) { throw "All Views must be have the name property set."; } }, properties : { name : undefined, render : function() { return false; }, id : function() { return this.name; } } }); exports.View = View;