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

invalid up-* html attributes #11

Closed
mechanoid opened this issue Feb 3, 2017 · 4 comments
Closed

invalid up-* html attributes #11

mechanoid opened this issue Feb 3, 2017 · 4 comments

Comments

@mechanoid
Copy link

While i like most of the ideas behind unpoly i wondered why this library uses its invalid attribute handlers, resulting in around 300 validation Errors on its main page alone.

Is there a reason why it is based on invalid attributes instead of relying on valid data-* prefixed ones? At least it would be nice to maybe post process the resulting files by prefixing those attribute handlers (even if it means some effort for js files).

@grizzlylab
Copy link

+1

@triskweline
Copy link
Contributor

Hey @mechanoid @grizzlylab @kmmbvnr,

Some reasons for this decision:

  • It was chosen for brevity and the aesthetics to compete with mainstream JS frameworks
  • I spent some years in AngularJS land where ng- attributes are everywhere, so I've grown used to it
  • HTML validation doesn't play a role in our workflow at work. We're using a template language that cannot output broken HTML, and we don't care about unknown elements or attributes.
  • I feel that with the advent web components / custom elements the relevance of HTML validation will fade

If this is something that a lot of users feel strongly about, maybe a good solution would be to allow data-up-foo in addition to up-foo, and let developers make their choice. This is a solution that Angular 1 picked.

It would add some extra code to the .js though.

@yordis
Copy link

yordis commented Apr 8, 2017

Yeah, the last bullet point is the stronger one. Now with Custom Elements spec the validations have to change.

@triskweline
Copy link
Contributor

No one seems to want to tackle this right now, so I'm closing the issue.

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

4 participants