Skip to content

Make jQuery Optional#73

Closed
sandstrom wants to merge 3 commits intoemberjs:masterfrom
sandstrom:master
Closed

Make jQuery Optional#73
sandstrom wants to merge 3 commits intoemberjs:masterfrom
sandstrom:master

Conversation

@sandstrom
Copy link
Contributor

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mike1o1
Copy link

mike1o1 commented Jul 6, 2015

One approach the Angular team takes is to use Google's jqLite library if jQuery itself isn't loaded. Is it worth investigating to see if a similar approach can be taken for Ember?

This can also be exposed for developers. If a developer invokes Ember.$ or this.$() within a view and jQuery is not available, Ember would return an instance of jqLite. Angular's equivalent to Ember.$ is angular.element, which is documented here, in case you wanted some prior art to look at.

@locks
Copy link
Contributor

locks commented Jul 6, 2015

Related: emberjs/ember.js#3791

@runspired
Copy link
Contributor

Related #86 removes most of the reliance on jQuery for eventing.

In my current implementation, jQuery.event.fix(e) is used to normalize the event. This is something that could be pulled out as a micro-lib exposing the needed jquery AMD module.

https://github.com/runspired/ember-capture-eventing/blob/master/addon/event_dispatcher.js#L379

@ming-codes
Copy link

Related: https://github.com/rwjblue/ember-native-dom-event-dispatcher

Haven't tried it yet, but assuming it works, it's a bridge to be rid of jQuery.

@sandstrom
Copy link
Contributor Author

Closing this RFC, since work is now underway to make jQuery optional.

@sandstrom sandstrom closed this Jan 18, 2018
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

Successfully merging this pull request may close these issues.

6 participants