Attaching event handlers directly #79

Closed
smathy opened this Issue Sep 20, 2011 · 2 comments

Comments

Projects
None yet
2 participants
@smathy
Contributor

smathy commented Sep 20, 2011

It'd be great to be able to do this:

button "foo", "Foo", onclick: ->
  get "/foo"

Instead of having to attach it in the onload.

@mauricemach

This comment has been minimized.

Show comment
Hide comment
@mauricemach

mauricemach Sep 20, 2011

Owner

Thanks (for moving the issue)!

I'm thinking of rendering it as onclick="(function(){foo();}).call(this)", which is the default CoffeeScript wrapping. What do you think?

Owner

mauricemach commented Sep 20, 2011

Thanks (for moving the issue)!

I'm thinking of rendering it as onclick="(function(){foo();}).call(this)", which is the default CoffeeScript wrapping. What do you think?

@smathy

This comment has been minimized.

Show comment
Hide comment
@smathy

smathy Sep 20, 2011

Contributor

Yeah, makes sense.

Contributor

smathy commented Sep 20, 2011

Yeah, makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment