Created
August 4, 2012 11:04
-
-
Save yreynhout/3256733 to your computer and use it in GitHub Desktop.
Viewmodels - Building blocks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Trigger = function () { | |
if (!this instanceof Trigger) { | |
return new Trigger(); | |
} | |
var self = PausableSubscriberExtension( | |
DisposableExtension( | |
FocusExtension( | |
EnableExtension( | |
VisibleExtension( | |
this))))), | |
triggerCallback; | |
self.Command = function () { | |
triggerCallback(); | |
}; | |
self.setCallback = function (callback) { | |
triggerCallback = callback; | |
}; | |
return self; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment