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

Isn't reusable #2

Closed
janat08 opened this issue Feb 6, 2018 · 4 comments
Closed

Isn't reusable #2

janat08 opened this issue Feb 6, 2018 · 4 comments

Comments

@janat08
Copy link
Contributor

janat08 commented Feb 6, 2018

https://jsfiddle.net/fwLbqmsj/
Using your own example, i've appended another element and the second instance won't run.

@codemeasandwich
Copy link
Owner

codemeasandwich commented Feb 6, 2018

You need to close your tag the same as you do with a script tag. <my-time country="uk"></my-time> it's just a quirk of the web, that some tags must be close ¯_(ツ)_/¯

@janat08
Copy link
Contributor Author

janat08 commented Feb 6, 2018

I guess it's using wire with id that makes it unreusable.

@codemeasandwich
Copy link
Owner

This closing of tags is part of the browser not hyperHTML.

This is an example
https://jsfiddle.net/bccqa5n1/1/

You can see that custom tags defined in the page must have a matching closing tag or it will just stay open. BUT you can have a self closing custom tag inside you render because hyperHTML v2.5 will now automatically add the matching closing tag

@janat08
Copy link
Contributor Author

janat08 commented Feb 7, 2018

The issue is in fact about when you use hyperhtml.wire(obj, "ID")``, and then try to render a component that holds this wire id twice making it fail, which in my case like the whole app is based on. I'll close this as this is upstream without opening one in hyperhtml.

@janat08 janat08 closed this as completed Feb 7, 2018
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