-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
async properties #202
async properties #202
Conversation
return RequestManager.getInstance().send({ | ||
method: this.setter, | ||
params: [this.formatInput(value)] | ||
Property.prototype.asyncGet = function (callback) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though i would habe called it getAsync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
I really like the changes, but i makes myself question the whole use of "properties". Why we don't plainly use: // sync
var res = web3.eth.blockNumber();
// async
web3.eth.blockNumber(function(e,res) { ... }) You can still use the properties synchronously, but you need to add a |
but we will break another thing then :) I would prefer to do it later, after merging this pr and releasing new version :) |
ok. lets do it later then. it will anyway be very much recommended to use only async, except you know what you're doing. |
added:
removed: