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

Provide more expressive method names other than 'c' or 't' #10

Closed
thomasfr opened this issue Jan 19, 2012 · 3 comments
Closed

Provide more expressive method names other than 'c' or 't' #10

thomasfr opened this issue Jan 19, 2012 · 3 comments

Comments

@thomasfr
Copy link

Instead of the very short and not expressive function names, it would be better to have more self explanatory function names, like 'childNode' and 'text' and so on

@astro
Copy link
Member

astro commented Jan 19, 2012

I'm afraid they could be confused with the equally named properties (not methods) of the standard DOM.

@thomasfr
Copy link
Author

I understand. That is indeed confusing maybe. So the only way is to have methods like createChildNode, createTextNode and so on AND the shorthand aliases in my opinion.
What do you think?

@astro
Copy link
Member

astro commented Jan 19, 2012

No, because they can be confusing. Why not write get or set whenever you want retrieve or modify something?

The highly brief names like c() and t() have been copied from Strophe.js to provide a familiar terrain in the builder pattern. Yet, contrary to node-xmpp, they base on the real DOM and use its methods. That's not available here.

@astro astro closed this as completed Mar 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants