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

Listener attributes not rendered properly #222

Closed
jbalsas opened this issue Mar 30, 2017 · 2 comments
Closed

Listener attributes not rendered properly #222

jbalsas opened this issue Mar 30, 2017 · 2 comments
Assignees
Labels

Comments

@jbalsas
Copy link
Contributor

jbalsas commented Mar 30, 2017

Currently, incremental-dom renderer is outputing something like:

<div class="alert alert-dismissible alert-success fade" role="alert">
  body
  <button type="button" class="close" aria-label="Close" data-onclick="data-onclick">
    <span aria-hidden="true">×</span>
  </button>
</div>

where it should be rendering

<div class="alert alert-dismissible alert-success fade" role="alert">
  body
  <button type="button" class="close" aria-label="Close" data-onclick="onClickHandler_">
    <span aria-hidden="true">×</span>
  </button>
</div>

This is likely caused by https://github.com/metal/metal.js/blob/master/packages/metal-incremental-dom/src/render/attributes.js#L98 where we should do instead fn.givenAsName_ = value;

@jbalsas
Copy link
Contributor Author

jbalsas commented Mar 30, 2017

Hey @fernandosouza, in case you aren't already... could you take a look at this and try to come up with a test and a proper fix?

Thanks!

@fernandosouza
Copy link
Contributor

Sure, @jbalsas.

fernandosouza pushed a commit to fernandosouza/metal.js that referenced this issue Mar 31, 2017
fernandosouza pushed a commit to fernandosouza/metal.js that referenced this issue Mar 31, 2017
robframpton pushed a commit that referenced this issue Apr 3, 2017
Sets its name inside the listener function. Fixes #222
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants