Skip to content

Commit

Permalink
moved the call to eval() into an own method
Browse files Browse the repository at this point in the history
sometimes it's not feasible that the push server can execute any javascript on
the
client, which the default implementation does. now it is possible to override
that
behavior by overriding Juggernaut.fn.dispatchMessage(body) with an own
implementation (via nesquena)
  • Loading branch information
maccman committed Aug 3, 2009
1 parent d8b7bed commit 0297b77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion media/juggernaut.js
Expand Up @@ -101,8 +101,12 @@ Juggernaut.fn.receiveData = function(e) {
this.currentMsgId = msg.id;
this.currentSignature = msg.signature;
this.logger("Received data:\n" + msg.body + "\n");
eval(msg.body);
this.dispatchMessage(msg);
}

Juggernaut.fn.dispatchMessage = function(msg) {
eval(msg.body)
}

var juggernaut;

Expand Down

0 comments on commit 0297b77

Please sign in to comment.