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

Lack of integration with jQuery #15

Closed
legalbox opened this issue Jan 28, 2011 · 2 comments
Closed

Lack of integration with jQuery #15

legalbox opened this issue Jan 28, 2011 · 2 comments

Comments

@legalbox
Copy link

The Globalization plugin defines methods, both public and private, that are already part of jQuery:

  • Globalization.extend() -> jQuery.extend()
  • trim() -> jQuery.trim()
  • isArray() -> jQuery.isArray()
  • isObject() -> jQuery.isPlainObject() or jQuery.type(obj) === 'object'
  • arrayIndexOf -> jQuery.inArray()

Is there something specific in these implementations that prevents calling jQuery methods instead?

@scottgonzalez
Copy link
Contributor

There's nothing jQuery-specific about the globalization plugin and the benefit of providing something that works everywhere outweighs the benefits of not defining a few small functions.

@jzaefferer
Copy link
Contributor

There actually was a jQuery-independent version of the plugin, exporting window.Globalization. I removed that, as it duplicated the full plugin and made any changes require changing two files.

What we actually need is a build that exports a jQuery-free version. And the jQuery-specific version could be optimized to use jQuery methods, but the overhead is pretty small, so not so much of a priority.

This issue was closed.
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