Skip to content
This repository has been archived by the owner on May 27, 2018. It is now read-only.

Feature Request: Interpolating functions as event handlers #6

Open
loilo opened this issue May 1, 2017 · 0 comments
Open

Feature Request: Interpolating functions as event handlers #6

loilo opened this issue May 1, 2017 · 0 comments

Comments

@loilo
Copy link
Member

loilo commented May 1, 2017

I'm thinking about a feature allowing the following:

function greet () {
  alert('Hello!')
}

domify `<button onclick=${greet}>Greet</button>`

Or even shorter:

domify `<button onclick=${() => alert("Hello!")}>Greet</button>`

That should not be too hard to implement.

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

No branches or pull requests

1 participant