mythz/jquip — pull request #40 by statianzo (2012-09-22 04:56:59+00:00)
Title: Backbone Compatibility

For the sake of some code review, I've posted this as a pull request. This branch fixes some issues with the latest backbone as well as some previously unnoticed bugs surrounding out-of-DOM elements.

The changes are as follows:

- Brought in backbone as a submodule to allow for keeping an up to date vendored copy of backbone.js and tests.
- Created a jquip version of the backbone test runner page.
- FIX: Creating nodes with an attribute hash `$('', {href: 'http://example.com'})`. Previously this was broken.
- Support `filter()` on orphan nodes.
- Support finding elements by Id when not in DOM. This may be the most significant change, as `$$` was modified.
- Some additional jasmine tests around events
- Remove non-jquip libs from `src/`

As a result of the changes, all but 12 assertions pass in the Backbone suite. The blocking issue around these tests is that event bubbling doesn't occur when elements aren't attached to the DOM. Backbone's tests use unattached elements. jQuery works around this by having [their own implementation][1] of event bubbling. The bloat that would come from adding seems like it would provide minimal gain.

[1]: https://github.com/jquery/jquery/blob/master/src/event.js#L292