Closed felquis closed 9 years ago
selecting(document, function(selector, otherInfos) { console.log(otherInfos.wordCount); });
I think this is useful, to avoid the programar to write more code in the callback.
It'd be something like
selecting(document, function(selector) { console.log(selector.split(' ').length); });
The first proposed solution, is so much elegant.
@EvandroLG what you think about a second parameter? Or, just transform the first parameter to a object, with a lot of helpful information.
selecting(document, function(selected) { console.log(selected.text); console.log(selected.wordCount); });
Etc... would be awesome!
I think this is useful, to avoid the programar to write more code in the callback.
It'd be something like
The first proposed solution, is so much elegant.
@EvandroLG what you think about a second parameter? Or, just transform the first parameter to a object, with a lot of helpful information.
Etc... would be awesome!