Skip to content

Instantly share code, notes, and snippets.

@kaiquewdev
Created March 21, 2012 23:06
Show Gist options
  • Select an option

  • Save kaiquewdev/2154003 to your computer and use it in GitHub Desktop.

Select an option

Save kaiquewdev/2154003 to your computer and use it in GitHub Desktop.
var Event = (function () {
var Event = function Event() {};
Event.prototype._target;
Event.prototype.set = function set( value ) {
value = value || '';
if ( value ) {
_target = value;
}
return this;
};
Event.prototype.get = function get() {
return _target;
};
return new Event();
} ());
var event = Event;
event.set('Hello skitter');
console.log(event.get());
console.log(Event.set('Boy').get());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment