aboutsummaryrefslogtreecommitdiffstats
path: root/test/jqLiteSpec.js
AgeCommit message (Collapse)Author
2013-08-09fix(docs-bootstrap): Removed injector from bootstrapped docs samplesJeff Cross
This is necessary to make e2e tests pass for implementing #3411. At present, the docs are violating the rule being enforced by double-bootstrap prevention.
2013-08-09docs(jqLite): update the minErr codes for on() and off()Igor Minar
2013-08-08fix(jqLite): throw when jqLite#off called with 4 argsKen Sheedlo
Closes #3501
2013-08-07fix(jqLite): return array from multi select in val()Eric Hagman
2013-08-07fix(jqLite): forgive unregistration of a non-registered handlerPawel Kozlowski
2013-07-31fix(jqLite): support space-seperated events in offAndy Joslin
Closes #3256
2013-07-02fix(jqLite): prepend array in correct orderJoao Sa
Match jQuery behavior when prepending array into empty element
2013-06-19feat(jqLite): switch bind/unbind to more recent jQuery on/offMichał Gołębiowski
jQuery switched to a completely new event binding implementation as of 1.7.0, centering around on/off methods instead of previous bind/unbind. This patch makes jqLite match this implementation while still supporting previous bind/unbind methods.
2013-05-30fix(jqLite): Added optional name arg in removeDataJeff Cross
jQuery's API for removeData allows a second 'name' argument to just remove the property by that name from an element's data. The absence of this argument was causing some features not to work correctly when combining multiple directives, such as ng-click, ng-show, and ng-animate.
2013-05-28feat($compile): support multi-element directiveMisko Hevery
By appending directive-start and directive-end to a directive it is now possible to have the directive act on a group of elements. It is now possible to iterate over multiple elements like so: <table> <tr ng-repeat-start="item in list">I get repeated</tr> <tr ng-repeat-end>I also get repeated</tr> </table>
2013-05-16fix(jqLite): pass a dummy event into triggerHandlerJulie
Previously, anchor elements could not be used with triggerHandler because triggerHandler passes null as the event, and any anchor element with an empty href automatically calls event.preventDefault(). Instead, pass a dummy event when using triggerHandler, similar to what full jQuery does. Modified from PR #2379.
2013-04-29fix(jqLite): correct implementation of mouseenter/mouseleave eventgockxml
Implement mouseenter/mouseleave event referring to http://www.quirksmode.org/js/events_mouse.html#link8 and jQuery source code(not dependent on jQuery). The old implementation is wrong. When moving mouse from a parent element into a child element, it would trigger mouseleave event, which should not. And the old test about mouseenter/mouseleave is wrong too. It just triggers mouseover and mouseout events, cannot describe the process of mouse moving from one element to another element, which is important for mouseenter/mouseleave. Closes #2131, #1811
2013-01-09fix(jqLite): children() should only return elementsPete Bacon Darwin
The jQuery implementation of children only returns child nodes of the given element that are elements themselves. The previous jqLite implementation was returning all nodes except those that are text nodes. Use jQLite.contents() to get all the child nodes. The jQuery implementation of contents returns [] if the object has no child nodes. The previous jqLite implementation was returning undefined, causing a stack overflow in test/testabilityPatch.js when it tried to `cleanup()` a window object. The testabilityPatch was incorrectly using children() rather than contents() inside cleanup() to iterate down through all the child nodes of the element to clean up.
2013-01-08fix(jqLite): make next() ignore non-element nodesKeyamoon
next() is supposed to return the next sibling *element* so it should ignore text nodes. To achieve this, nextElementSibling() should be used instead of nextSibling().
2012-11-26fix(jqLite): support append on document fragmentIgor Minar
previously jquery didn't support append on this node type, now it does (since 1.8.x) so I'm adding this to jqlite as well.
2012-11-26feat(jqLite): add triggerHandler()Igor Minar
we need triggerHandler() to become jQuery 1.8.x compatible. this is not fully featured triggerHandler() implementation - it doesn't bother creating new DOM events and passing them into the event handlers. this is intentional, we don't need access to the native DOM event for our own purposes and creating these event objects is really tricky.
2012-08-10test(jqLite): add missing test for $destroy eventIgor Minar
2012-05-14fix(jqLite): .data()/.bind() memory leakMisko Hevery
Since angular attaches scope/injector/controller into DOM it should clean up after itself. No need to complain about memory leaks, since they can only happened on detached DOM. Detached DOM would only be in tests, since in production the DOM would be attached to render tree and removal would automatically clear memory.
2012-05-03feat(jqLite): support data() getter and data(obj) setterIgor Minar
... just like jquery does
2012-04-20fix(mouseenter): FF no longer throws exceptionsMisko Hevery
2012-03-22feat(jqLite): make injector() and scope() work with the document objectIgor Minar
For typical app that has ng-app directive on the html element, we now can do: angular.element(document).injector() or .injector() angular.element(document).scope() or .scope() instead of: angular.element(document.getElementsByTagName('html')[0]).injector() ...
2012-03-19bug(ie7): incorrectly set all inputs to disabledMisko Hevery
In ie7 all of the input fields are set to readonly and disabled, because ie7 enumerates over all attributes even if the are not declared on the element.
2012-03-19fix(compiler): allow transclusion of root elementsMisko Hevery
Fixed an issue where a directive that uses transclusion (such as ngRepeat) failed to link if it was declared on the root element of the compilation tree. (For example ngView or ngInclude including template where ngRepeat was the top most element).
2012-03-19feat(jqLite): add .controller() methodMisko Hevery
extend JQuery with .controller() method which retrieves the closest controller for a given element
2012-02-21feat($compile): support compiling text nodes by wrapping them in <span>Misko Hevery
2012-02-21feat(mouseenter/mouseleave): emulating ie eventsMisko Hevery
2012-01-25add($compile): add compiler v2.0 - not connectedMisko Hevery
2012-01-25feat(jqLite): add contents()Misko Hevery
2012-01-16feat(jqLite): added injector() helper methodIgor Minar
2011-11-14refactor(injector): turn scope into a serviceMisko Hevery
- turn scope into a $rootScope service. - injector is now a starting point for creating angular application. - added inject() method which wraps jasmine its/beforeEach/afterEach, and which allows configuration and injection of services. - refactor tests to use inject() where possible BREAK: - removed angular.scope() method
2011-10-12fix(jqLite): attr for boolean attribute should lowercase valueIgor Minar
2011-10-11chore(formating): clean code to be function() {Misko Hevery
2011-10-11feat(forms): new and improved formsMisko Hevery
2011-10-11fix(jqlite): removeClass would clobber class namesMisko Hevery
2011-10-11feat(jqlite): added .inheritedData method and $destroy event.Misko Hevery
- refactored .scope() to use .inheritedData() instead. - .bind('$destroy', callback) will call when the DOM element is removed
2011-09-28fix(jqLite): css should convert dash-separated properties to camelCaseIgor Minar
this fix is needed for Firefox or other browsers that strictly follow dom/css spec which states that element.style should make properties available in camelCased form. Closes #569
2011-09-16fix(specs): various fixes to get IE8+jquery unit tests greenIgor Minar
2011-09-16fix(specs): fix jQuery to jqLite binding on IE8Igor Minar
It appears that this whole time all IE8 unit tests ran only with jqLite. Due to a weird bug in IE[1], we never overwrote jqLite implementation with jQuery, so the tests ran with our jqLite instead. This affected only IE8 (and likely older) and only in unit testing mode. angular.js - the built artifact binds to jQuery just find. [1] https://plus.google.com/104744871076396904202/posts/Kqjuj6RSbbT
2011-09-16fix(specs): jQuery now returns attr name instead of true/false for special attrsIgor Minar
for special attrs like 'checked' or 'multiple', jquery now returns the name or undedefined. e.g. foo.attr('checked') => 'checked' || undefined The solution is a combination of updating our tests as well as switching over to prop() instead which properly returns true/false
2011-09-16feat(jqLite): add prop() supportIgor Minar
since jQuery 1.6.4 prop() became very important because attr() does't have access to certain properties any more (e.g. className), so I'm adding it to jqLite as well so that jqLite preserves the feature-set it had before the jQuery upgrade.
2011-09-16feat(jqLite): add support for unbind()Igor Minar
supports these invocation types: - foo.unbind(); - foo.unbind('eventType'); - foo.unbind('eventType', fn); more info: http://api.jquery.com/unbind/
2011-09-16fix(jqLiteSpec): jQuery's css() getter works only for valid rulesIgor Minar
foo.css('bogus', 'value') foo.css('bogus') => null so I had to change all tests to use valid css rules
2011-09-16fix(jqLite): attr() should not special-case 'class' attributeIgor Minar
since jQuery 1.6 'class' is not treated specially, so we have to revert this fix and use className in tests instead
2011-09-08feat(jqLite): add event.isDefaultPrevented() as jQueryVojta Jina
Chrome's Event has defaultPrevented property, but other browsers haven't. This is workaround for other browsers - same as jQuery.
2011-09-01fix(ng:class): make ng:class friendly towards other code adding/removing classesIgor Minar
ng:class as well as ng:class-odd and ng:class-even always reset the class list to whatever it was before compilation, this makes it impossible to create another directive which adds its own classes on the element on which ng:class was applied. the fix simply removes all classes that were added previously by ng:class and add classes that the ng:class expression evaluates to. we can now guarantee that we won't clobber stuff added before or after compilation as long as all class names are unique. in order to implement this I had to beef up jqLite#addClass and jqLite#removeClass to be able to add/remove multiple classes without creating duplicates.
2011-09-01fix(jqLite): addClass should ignore falsy valuesIgor Minar
2011-09-01test(jqLite): add test for mass assignment to styleIgor Minar
2011-09-01fix(jqLite): special-case attr('class') because of IE9 bugIgor Minar
2011-08-23fix(jqlite): correct the jqLite.removeClass methodIgor Minar
2011-08-15refactor(jqLite): remove jqLite show/hide supportIgor Minar
it turns out that even with our tricks, jqLite#show is not usable in practice and definitely not on par with jQuery. so rather than introducing half-baked apis which introduce issues, I'm removing them. I also removed show/hide uses from docs, since they are not needed. Breaks jqLite.hide/jqLite.show which are no longer available.