Skip to content
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

Current API not a great fit with code completion or static analysis #1

Open
sethladd opened this issue Sep 14, 2014 · 1 comment
Open

Comments

@sethladd
Copy link

Thanks for sharing!

Have you checked out https://github.com/JosephMoniz/dart-throttle ? There might be a generic way to throttle stream events.

The current API of:

element.on('someevent')...

Is prone to misspellings and isn't a great fit for code completion. I wonder if there's a more Dart way to design this API?

For example, I wonder if you could build a StreamController that knew how to throttle. That way, you don't have to built the on(something API... just work with the Stream API.

@shivanshuag
Copy link
Owner

Hi,
Correct me if I misunderstood you.
I'm sorry, I put the wrong brackets here. The someevent here can be any generic event. It should have been element.on['keyup'] or any other event. I will update the README and remove someevents because it is confusing.

I wanted to keep it like the jquery version, so I did not use event Streams.

Thanks for taking interest in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants