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

consider removing data-* in place of interpolation #45

Closed
tj opened this issue May 14, 2013 · 7 comments
Closed

consider removing data-* in place of interpolation #45

tj opened this issue May 14, 2013 · 7 comments
Milestone

Comments

@tj
Copy link
Member

tj commented May 14, 2013

related to #44. This would be more expensive in terms of walking the dom tree to discover bindings but if we measure this out and it's reasonable it would probably be worth it. Ex:

<a href="/download/{id}">Download {title}</a>

vs

<a data-href="/download/{id}" data-text="Download {title}"></a>
@vendethiel
Copy link
Member

Would be nice to have for content, but I have it's quite the hot part for attributes

@tj
Copy link
Member Author

tj commented May 16, 2013

yeah we'll see! sucks you cant do [**="{"] haha where the first * is any attr

@tj
Copy link
Member Author

tj commented May 17, 2013

got most of it working really well so far, pretty happy with it, just need to polish things up and I'll merge to master

@vendethiel
Copy link
Member

Yay!

@matthewmueller
Copy link
Member

wow, this looks really sweet

@timoxley
Copy link
Member

With the old style you could set a default with the regular attribute before the JS loaded, e.g. now there's a possibility of broken links if users click things before the page has fully loaded. Probably not a problem worth solving given this api is far less cumbersome. Nice job.

@tj
Copy link
Member Author

tj commented May 19, 2013

@timoxley for SPAs like ours it doesn't matter much since the content itself wouldn't be loaded yet either but that's a good point

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

No branches or pull requests

4 participants