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

What about making ampersand-class-extend an amp module? #66

Open
jvduf opened this issue Jan 14, 2015 · 6 comments
Open

What about making ampersand-class-extend an amp module? #66

jvduf opened this issue Jan 14, 2015 · 6 comments

Comments

@jvduf
Copy link
Contributor

jvduf commented Jan 14, 2015

It's a utility module as well. Would be a clean and consistent approach to merge it into amp instead of having it as an individual module. What do you think?

It requires a small change to the objects extend module already in amp but that could be a simple name change, for example:
amp-object-extend
amp-class-extend

@jvduf
Copy link
Contributor Author

jvduf commented Jan 15, 2015

@HenrikJoreteg what do you think about this proposal?

@HenrikJoreteg
Copy link
Member

Yeah, seems logical as long as we can name things in a way that make sense. I'm hesitant to re-name but having amp-extend and amp-class-extend seems fine.

@wraithgar
Copy link
Contributor

Just a suggestion to keep the nomenclature matching the other 'class' methods (i.e. amp-add-class) which would make this amp-extend-class

I'm a little lukewarm about renaming amp-extend since it's an already established programming concept (extending objects) versus this other subset of methods (that manipulate class attributes on a DOM element)

@gsf
Copy link

gsf commented Jan 21, 2015

Any name with "class" in it is confusing to me given that all of the existing ones deal with DOM classes. How about following the lead of Closure and Node and going with amp-inherits?

@gsf
Copy link

gsf commented Jan 21, 2015

Also worth thinking about is what happens to a utility like this as we migrate to ES6 classes?

@jvduf
Copy link
Contributor Author

jvduf commented Jan 21, 2015

I like the amp-inherits!

re: ES6, I am not sure. I guess this takes some time.

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

5 participants