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

HTML event handler attributes reserve the word "event" #216

Open
olaf-k opened this issue Jun 24, 2014 · 2 comments
Open

HTML event handler attributes reserve the word "event" #216

olaf-k opened this issue Jun 24, 2014 · 2 comments

Comments

@olaf-k
Copy link

olaf-k commented Jun 24, 2014

As explained in the playground, event has a special meaning when used as an argument of an event handler.

To avoid possible confusion/mistakes with user-declared variables, could we adopt a specific naming convention for such cases, like $event instead?

@jakub-g
Copy link
Collaborator

jakub-g commented Jul 4, 2014

+1, in addition, IMO we should do the same to attributes and call them $attributes. Why have $init, $render, $dispose but attributes? Consistency is important.

@ymeine
Copy link
Contributor

ymeine commented Jul 4, 2014

Personally I never liked the use of naming conventions to distinguish expected properties of an object from free ones. At some point, someone could want to choose a reserved name for one of its properties, and he would not be able to do so.

Why not wrapping prototype members under a property of the definition object? (like prototype, aliased proto) Then, in this particular case, since $init, $render and so on end as direct prototype members, this would make sense to put them inside this property as well, and to keep the naming convention in this case. We can't do magical things with the API, either we identify differently in the same space or we put in different spaces.

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

3 participants