aboutsummaryrefslogtreecommitdiffstats
path: root/src/jqLite.js
AgeCommit message (Collapse)Author
2012-11-26fix(jqLite): fire $destroy event via triggerHandlerIgor Minar
in jQuery 1.8.x the data() data structure is changed and events are not accessible via data().events. Since all we need is to trigger all event handlers, we can do so via triggerHandler() api instead of mocking with the internal jQuery data structures. This fix was originally proposed by PeteAppleton via PR #1512. Closes #1512
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-30fix(jqLite): better support for xhtmlIgor Minar
it turns out that some stuff doesn't work in xhtml as it does in html. for example   can't be innerHTML-ed and auto-closing of elements doesn't work. the reporter of the referenced issue claimed that innerHTML vs text on script made a difference but that doesn't appear to be true in my testing. I'm not including test for this because testacular doesn't currently run tests in xhtml yet. Closes #1301
2012-06-12docs(*): simplify doc urlsIgor Minar
we now have two types of namespaces: - true namespace: angular.* - used for all global apis - virtual namespace: ng.*, ngMock.*, ... - used for all DI modules the virual namespaces have services under the second namespace level (e.g. ng.) and filters and directives prefixed with filter: and directive: respectively (e.g. ng.filter:orderBy, ng.directive:ngRepeat) this simplifies urls and makes them a lot shorter while still avoiding name collisions
2012-06-08chore(jqLite): performance reorderingMisko Hevery
2012-05-24fix(jqLite): don't eat event exceptionsMisko Hevery
JQuery does not catch exceptions either, and just lets them pass. This allows the exception to be shown in console.
2012-05-17fix(jqLite): have same expando format as jQueryMisko Hevery
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-03fix($compile): fix replaceWithIgor Minar
the old implementation didn't reattach jquery/jqlite data which caused things like to be lost I tried various implementations but it appears that by reattaching the data to the new node by copying the expando property is the most reliable of all.
2012-05-03feat(jqLite): support data() getter and data(obj) setterIgor Minar
... just like jquery does
2012-05-03style(jqLite): clean up the codeIgor Minar
2012-04-20fix(events): include ie8 in extra event property resetMisko Hevery
2012-04-20fix(mouseenter): FF no longer throws exceptionsMisko Hevery
2012-04-10chore(*): remove dead code and fix code style issuesIgor Minar
2012-04-09fix(docs): change all directive references to use the normalized namesIgor Minar
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-03-13f(compile): boolean attributes too agresiveMisko Hevery
- compiler would rewrite boolean attributes on all elements. This is too aggressive and interferes with some third-party frameworks
2012-03-08docs(jqlite): add docs for wrap()Igor Minar
2012-02-23fix(jqLite): set event's monkey patched methods to null (on IE7)Vojta Jina
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-02-05fix(jqLite): fix memory leaking in IE8 (remove monkey patched methods on Event)Vojta Jina
These methods cause IE8 holds the whole jqLite in the memory, even when page is reloaded. jqLite's cache keeps element's data (event handlers, attached scopes, injector, etc…), so almost all used memory is never released in IE8. jQuery creates its own Event object (wrapper around native Event) instead.
2012-01-25cleanup($scope): remove $$scope ref.Misko Hevery
2012-01-25docs(compiler): update the compiler docsMisko Hevery
2012-01-25refactor(directives): connect new compilerMisko Hevery
- turn everything into a directive
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-12-05fix(jqLite): JQLiteHasClass should work even when minifiedIgor Minar
closure compiler is smarter than we expected and drops the unused fn argument - this breaks the meta-programing logic of jqLite. The fix special cases JQLiteHasClass since its the only fn that needs this treatment in a way that is minification-proof.
2011-11-14refactor(api): remove type augmentationMisko Hevery
BREAK: - remove angular.[Object/Array/String/Function] - in templates [].$filter(predicate) and friends need to change to [] | filter:predicate
2011-10-30docs(jqlite): add missing methodsVojta Jina
2011-10-20fix(radio): allows data-binding on value property. Closes#316Misko Hevery
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-10-11feat(jqlite): support required as a no-value attributeMisko Hevery
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-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-16fix(jqLite): make css() on IE8 behave the same way as jQuery 1.6.4Igor Minar
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(jqLite): make attr() compatible with jQuery 1.6.4Igor Minar
The behavior of attr() getter and setter changed in jQuery 1.6 and now they treat element properties and attributes as two different things, but in order to not break everyone there is a partial backwards compatibility for checking and updating element properties as well. see http://api.jquery.com/prop/ for more info.
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