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

How addEventListener in nested template? #1250

Closed
oswaldofreitas opened this issue Mar 3, 2015 · 2 comments
Closed

How addEventListener in nested template? #1250

oswaldofreitas opened this issue Mar 3, 2015 · 2 comments

Comments

@oswaldofreitas
Copy link

Please, see the following link for details:
http://stackoverflow.com/questions/28838190/how-addeventlistener-in-nested-template

The question is: WHEN (in which event) should I use querySelectorAll() to get my forms that are inside a second/nested template (first is "#app"). Array length is returning zero.

@oswaldofreitas
Copy link
Author

app.addEventListener('template-bound', function() {
    var template2 = app.$.template2;
    var forms = template2.querySelectorAll('.teste');
    console.log(template2); <== ok (HTMLTemplateElement)
    console.log(forms.length); <== issue (0)
});

@oswaldofreitas
Copy link
Author

Question answered on stackoverflow, marking as closed

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

1 participant