diff options
author | obscuren <geffobscura@gmail.com> | 2014-08-20 16:41:20 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-08-20 16:41:20 +0800 |
commit | 0eb1db0d179e07e9133e5d2d2df5efcbb68d9884 (patch) | |
tree | 67e84c59b747e1c738e82181172f75667f0f9415 /ethereal | |
parent | ecc2c609d4dfe210c66c9316cf5b060f9b3a4ff0 (diff) | |
download | dexon-0eb1db0d179e07e9133e5d2d2df5efcbb68d9884.tar.gz dexon-0eb1db0d179e07e9133e5d2d2df5efcbb68d9884.tar.zst dexon-0eb1db0d179e07e9133e5d2d2df5efcbb68d9884.zip |
Added messages method
Diffstat (limited to 'ethereal')
-rw-r--r-- | ethereal/assets/ext/filter.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ethereal/assets/ext/filter.js b/ethereal/assets/ext/filter.js index 20f0b36a3..7af6f56e7 100644 --- a/ethereal/assets/ext/filter.js +++ b/ethereal/assets/ext/filter.js @@ -1,14 +1,14 @@ -var Filter = function(eth, options) { +var Filter = function(options) { this.callbacks = {}; this.seed = Math.floor(Math.random() * 1000000); - this.eth = eth; + this.options = options; eth.registerFilter(options, this.seed); }; Filter.prototype.changed = function(callback) { var cbseed = Math.floor(Math.random() * 1000000); - this.eth.registerFilterCallback(this.seed, cbseed); + eth.registerFilterCallback(this.seed, cbseed); var self = this; message.connect(function(messages, seed, callbackSeed) { @@ -21,3 +21,7 @@ Filter.prototype.changed = function(callback) { Filter.prototype.uninstall = function() { eth.uninstallFilter(this.seed) } + +Filter.prototype.messages = function() { + return JSON.parse(eth.messages(this.options)) +} |