Skip to content

Commit

Permalink
Add signaling method.
Browse files Browse the repository at this point in the history
  • Loading branch information
MisakiFukuyo committed Sep 26, 2015
1 parent fe9b331 commit 58a4226
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Jelinkies.js
Expand Up @@ -3,6 +3,11 @@ var Jelinkies = function(linkObjective,captureMethod,insertMethod){
if(captureMethod == undefined && insertMethod == undefined){
this.linkObjective = linkObjective;
var self = this;
this.signaling = function(){
for (var i=0;i<self.onSignaledActions.length;i++) {
self.onSignaledActions[i](self.linkObjective);
}
}
this.linkedValue = function(val){
if(val == undefined){
return self.linkObjective;
Expand All @@ -17,6 +22,11 @@ var Jelinkies = function(linkObjective,captureMethod,insertMethod){
this.captureMethod = captureMethod;
this.insertMethod = insertMethod;
var self = this;
this.signaling = function(){
for (var i=0;i<self.onSignaledActions.length;i++) {
self.onSignaledActions[i](self.captureMethod(linkObjective));
}
}
this.linkedValue = function(val){
if(val == undefined){
return self.captureMethod(linkObjective);
Expand Down

0 comments on commit 58a4226

Please sign in to comment.