aboutsummaryrefslogtreecommitdiffstats
path: root/src/jqLite.js
AgeCommit message (Collapse)Author
2014-03-17fix(jqLite): traverse `host` property for DocumentFragment in inheritedData()Caitlin Potter
If dealing with a document fragment node with a host element, and no parent, use the host element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM to lookup parent controllers. Closes #6637
2014-03-05style: enable jscs requireLeftStickedOperators ruleTimothée Jeannin
Closed #6544.
2014-02-27fix(jqLite): properly toggle multiple classesPawel Kozlowski
Fixes #4467 Closes #6448
2014-02-18fix(jqLite): make jqLite('<iframe src="someurl">').contents() return iframe ↵Caitlin Potter
document, as in jQuery This is a very tiny change to make behaviour consistent with jQuery. Closes #6320 Closes #6323
2014-02-16docs(bike-shed-migration): fix url-based links refs to AUTO modulePeter Bacon Darwin
2014-02-16docs(bike-shed-migration): Add missing module tagPeter Bacon Darwin
The generator is able to imply the module from the containing folder for most files but these are in the ng module but are stored at the root folder.
2014-02-14chore(jqLite): expose the _data lookup function to angular.elementMatias Niemelä
2014-02-11docs(jqLite): link to jQuery.fn.bind/unbind docs rather than ↵Evgeniy Tkachenko
jQuery.fn.on/off docs Сorrect link. Closes #6171
2014-02-04fix(jqLite): trim HTML string in jqLite constructorCaitlin Potter
jQuery will construct DOM nodes containing leading whitespace. Prior to this change, jqLite would throw a nosel minErr due to the first character of the string not being '<'. This change corrects this behaviour by trimming the element string in jqLite constructor before testing for '<'. Closes #6053
2013-12-19feat(jqLite): provide support for element.one()Matias Niemelä
2013-12-16fix(jqLite): support unbind self within handlerChris Chua
If an event handler unbinds itself, the next event handler on the same event and element doesn't get executed. This works fine in jQuery, and since jqLite doesn't support .one, this might be a common use case.
2013-12-13perf(jqLite): implement and use the `empty` method in place of `html(‘’)`Michał Gołębiowski
jQuery's elem.html('') is way slower than elem.empty(). As clearing element contents happens quite often in certain scenarios, switching to using .empty() provides a significant performance boost when using Angular with jQuery. Closes #4457
2013-12-03fix(jqLite): ignore incompatible nodes on find()Hubert SABLONNIÈRE
When a jqLite collection contains text nodes, find() does not work :-( This fix ignores all nodes than can't do getElementsByTagName() It seems a little bit faster than testing nodeType : http://jsperf.com/nodetype-vs-duck-typing Closes #4120
2013-11-07feat(jqLite): expose isolateScope() getter similar to scope()Igor Minar
See doc update in the diff for more info. BREAKING CHANGE: jqLite#scope() does not return the isolate scope on the element that triggered directive with isolate scope. Use jqLite#isolateScope() instead.
2013-10-22style: make jshint happyVojta Jina
2013-10-18docs: correct broken linksVojta Jina
This also contains some whitespace corrections by my editor.
2013-10-09fix(jqLite): ignore class methods on comment elementsVojta Jina
Since c785267e jqLite uses setAttribute (rather than className property) in order to change classes. Some elements (eg. Comment) do not have this method which blows up. jQuery silently ignores these method calls (because it uses className), so to get the same behavior as jQuery, we check for setAttribute method first.
2013-10-08docs(jqLite): improve jqLite docsBrian Ford
2013-10-08fix(ngTouch): ngClick does not pass touchend event when jQuery is loadedSteven Sojka
The trigger handler event in jqLite takes an event object as a second parameter, but jQuery requires an array of parameters. This is causing the touchend event to not come thtough in the click handler when jQuery is loaded.
2013-09-27fix(jqLite): use get/setAttribute so that jqLite works on SVG nodesBrian Ford
jqLite previously used `elt.className` to add and remove classes from a DOM Node, but because the className property is not writable on SVG elements, it doesn't work with them. This patch replaces accesses to `className` with `get/setAttribute`. `classList` was also considered as a solution, but because only IE10+ supports it, we have to wait. :'( The JqLiteAddClass/JQLiteRemoveClass methods are now also used directly by $animate to work around the jQuery not being able to handle class modifications on SVG elements. Closes #3858
2013-09-25docs(jqLite): fix typolorint
Closes #4105
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-09fix(jqLite): properly detect unsupported calls for on()/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-18docs(jqLite): document "$destroy" eventPete Bacon Darwin
2013-07-02fix(jqLite): prepend array in correct orderJoao Sa
Match jQuery behavior when prepending array into empty element
2013-07-01fix(jqLite): rename jqLiteError to jqLiteMinErrIgor Minar
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-06-17fix(jqLite): allow override of jqLite.triggerHandler event objectMatias Niemelä
2013-06-17chore(minErr): replace ngError with minErrKen Sheedlo
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-24feat(ngError): add error message compression and better error messagesIgor Minar
- add toThrowNg matcher
2013-05-23fix(jqLite): correctly monkey-patch core jQuery methodsMichał Gołębiowski
When real jQuery is present, Angular monkey patch it to fire `$destroy` event. This commit fixes two issues in the jQuery patch: - passing a selector to the $.fn.remove method (only fire `$destroy` on the matched elements) - using `$.fn.html` without parameters as a getter (do not fire `$destroy`)
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-05-06fix($location): prevent navigation when event isDefaultPreventedMisko Hevery
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-04-11docs(jqLite): clarified that children/parent do not support selectorsChristoph Burgdorf
2013-03-29docs(*): fixed typosPascal Borreli
2013-02-25feat(JQLite): ready() now supports document.readyState=='complete'Jørgen Borgesen
JQLite.ready() used for automatic bootstrapping (when jQuery is not present) now checks if document already is ready when first called. This simplifies bootstrapping when the angular script is loaded asynchronously. However if other scripts with angular app code are being loaded as well it is developers responsibility to ensure that these scripts are loaded after angular-loader.js is evaluated and before angular.js script is evaluated.
2013-01-20docs(jqLite): fix typosergiopantoja
2013-01-18feat(directive): added ng-open boolean directiveDavid Chang
Closes# 1797 add ng-open attribute
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-26style(jqLite): better variable namesIgor Minar
selector => cssClasses
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.