add uninstall filter back

Conflicts:
	dist/ethereum.js.map
	dist/ethereum.min.js
This commit is contained in:
Fabian Vogelsteller 2015-03-20 12:22:51 +01:00 committed by Marek Kotewicz
parent 89b1ca6f43
commit 6b07920aa5
4 changed files with 18 additions and 14 deletions

12
dist/ethereum.js vendored
View File

@ -2192,13 +2192,18 @@ var filter = function(options, implementation, formatter) {
});
};
implementation.startPolling(filterId, onMessages, implementation.uninstallFilter);
var watch = function(callback) {
implementation.startPolling(filterId, onMessages, implementation.uninstallFilter);
callbacks.push(callback);
};
var stopWatching = function() {
implementation.stopPolling(filterId);
callbacks = [];
};
var uninstall = function() {
implementation.stopPolling(filterId);
implementation.uninstallFilter(filterId);
callbacks = [];
@ -2216,6 +2221,7 @@ var filter = function(options, implementation, formatter) {
watch: watch,
stopWatching: stopWatching,
get: get,
uninstall: uninstall,
// DEPRECATED methods
changed: function(){
@ -2230,10 +2236,6 @@ var filter = function(options, implementation, formatter) {
console.warn('watch().happened() is deprecated please use filter().watch() instead.');
return watch.apply(this, arguments);
},
uninstall: function(){
console.warn('watch().uninstall() is deprecated please use filter().stopWatching() instead.');
return stopWatching.apply(this, arguments);
},
messages: function(){
console.warn('watch().messages() is deprecated please use filter().get() instead.');
return get.apply(this, arguments);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -119,13 +119,18 @@ var filter = function(options, implementation, formatter) {
});
};
implementation.startPolling(filterId, onMessages, implementation.uninstallFilter);
var watch = function(callback) {
implementation.startPolling(filterId, onMessages, implementation.uninstallFilter);
callbacks.push(callback);
};
var stopWatching = function() {
implementation.stopPolling(filterId);
callbacks = [];
};
var uninstall = function() {
implementation.stopPolling(filterId);
implementation.uninstallFilter(filterId);
callbacks = [];
@ -143,6 +148,7 @@ var filter = function(options, implementation, formatter) {
watch: watch,
stopWatching: stopWatching,
get: get,
uninstall: uninstall,
// DEPRECATED methods
changed: function(){
@ -157,10 +163,6 @@ var filter = function(options, implementation, formatter) {
console.warn('watch().happened() is deprecated please use filter().watch() instead.');
return watch.apply(this, arguments);
},
uninstall: function(){
console.warn('watch().uninstall() is deprecated please use filter().stopWatching() instead.');
return stopWatching.apply(this, arguments);
},
messages: function(){
console.warn('watch().messages() is deprecated please use filter().get() instead.');
return get.apply(this, arguments);