aboutsummaryrefslogtreecommitdiffstats
path: root/src/Browser.js
AgeCommit message (Collapse)Author
2011-07-27style(): fix couple of missing semi-colonsVojta Jina
2011-07-19doc(.defer.cancel): temporarily disable the docIgor Minar
2011-07-18feat($browser.$defer.cancel): support canceling defered tasksIgor Minar
2011-07-18fix($browser.setUrl): make browser.setUrl more efficientIgor Minar
- browser should remember the last value retrieved via browser.getUrl - browser should update window.location only if the new value is different from the current window.location value
2011-07-18feat(strict mode): adding strict mode flag to all js filesIgor Minar
the flag must be in all src and test files so that we get the benefit of running in the strict mode even in jstd the following script was used to modify all files: for file in `find src test -name "*.js"`; do echo -e "'use strict';\n" > temp.txt cat $file >> temp.txt mv temp.txt $file done
2011-07-18refactor($browser): hide startPoll and poll methodsDiPeng
Breaks $browser.poll() method is moved inline to $browser.startpoll() Breaks $browser.startpoll() method is made private Refactor tests to reflect updated browser API Closes #387
2011-07-13refactor($browser.xhr): use $browser.addJs for JSONPIgor Minar
There is no reason why we shouldn't reuse $browser.addJs for JSONP requests.
2011-07-13fix($browser.addJs): make addJs jQuery compatibleIgor Minar
Change addJs implementation to avoid use of jQuery because of issues that affect angular-ie-compat.js. See inlined comment for more info.
2011-07-13fix($browser.xhr): properly delete jsonp callbacksIgor Minar
2011-06-30feat:$xhr: provide access to $xhr header defaultsIgor Minar
$xhr header defaults are now exposed as $xhr.defaults.headers.common and $xhr.default.headers.<httpmethod>. This allows applications to configure their defaults as needed. This commit doesn't allow headers to be set per request, only per application. Per request change would require api change, which I tried to avoid *for now*.
2011-06-27fix:$browser: Use document.createElement to create JSONP script tagVojta Jina
Creating <script> tags would require a lot of extra work if we want all browsers to load and execute these scripts. We decided to not implement that in jqLite. See #369 for more information. Closes #369
2011-06-02Refactor $browser's lazy start pollingVojta Jina
+ unit tests
2011-06-02Fix hashchange event on IE8 compatibility modeVojta Jina
Stupid IE8 in compatibility mode or in IE7 mode returns true for `('onhashchange' in window)`, but does not support hashchange event. Closes #353
2011-05-31Normalize IE XHR bug (status code 1223 to 204)Vojta Jina
See http://bugs.jquery.com/ticket/1450
2011-05-19XHR should add Content-type header only for POSTVojta Jina
Sending Content-type header causes JSTD (Jetty) proxy to change GET methods into POST.
2011-03-26remove _null and _undefinedIgor Minar
they have no significant effect on minified and gziped size. in fact they make things worse. file | before | after removal ---------------------------------------- concat | 325415 | 325297 min | 62070 | 62161 min + gzip | 25187 | 25176 The bottom line is that we are getting 0.05% decrease in size after gzip without all of the hassle of using underscores everywhere.
2011-03-11Remove the script tag after successful JSONP requestMisko Hevery
2011-03-11Added XSRF prevention logic to $xhr serviceMisko Hevery
2011-03-11Changed the $browser.xhr parameter post from optional to requiredMisko Hevery
2011-03-11Fixed cookies which contained unescaped '=' would not show up in cookie service.Misko Hevery
2011-02-25Added delay parameter to the $defer serviceMisko Hevery
2011-02-16Small spelling and grammar fixes in documentation.Anthony Lieuallen
2011-02-03Fixed notifyWhenNoOutstandingRequests() when using JSONPMisko Hevery
2011-02-01$browser poller should notify $location only once per url changeIgor Minar
2011-01-24fixed example rendering, add tests for it.Misko Hevery
2011-01-13significant rewrite of the $location serviceIgor Minar
- don't update browser before and after eval instead - sync location properties before eval - sync location properties and update browser after eval - added tests - symplified the code - removed $location.toString() because it was not idempotent and useless This resolves the issue with issuing two $route.onHashChange calls when the $location was updated with a hashPath that needs to be encoded
2011-01-10Rename angular.foreach to angular.forEach to make the api consistent.Igor Minar
camelcase is used for other angular functions and forEach is also used by EcmaScript standard. - rename the internal as well as the external function name - tweak the implementation of the function so that it doesn't clober it self when we extend the angular object with an object that has a forEach property equal to this forEach function Closes #85
2011-01-07change to keydown from keyup; add delayed $updateViewMisko Hevery
- There was a perceived lag when typing do to the fact that we were listening on the keyup event instead of keydown. The issue with keydown is that we can not read the value of the input field. To solve this we schedule a defer call and perform the model update then. - To prevent calling $eval on root scope too many times as well as to prevent drowning the browser with too many updates we now call the $eval only after 25ms and any additional requests get ignored. The new update service is called $updateView
2011-01-07$location service should utilize onhashchange events instead of pollingIgor Minar
2011-01-04Remove many eager-publish services, lazy pollingMisko Hevery
- Browser now starts the poller on first call to addPollFn() - Many services ($location, $cookies, $router) are no longer eager-publish. The result is that unless someone needs the $cookies, they will not cause the Browser to start polling for them.
2010-12-06add $browser.defer and $defer service and fix async xhr cache issueIgor Minar
- Closes #152 ($resource().query() sometimes calls callback before returning, and it shouldn't) - add $browser.defer method - add $defer service - integrate $browser.defer with outstandingRequests counter in $browser - fix all old tests that relied on buggy behavior
2010-11-18fix all closure compilation warnings due to invalid function typesIgor Minar
2010-11-18add @workInProgress tag and mark all @ngdocs as work in progressIgor Minar
2010-11-18make @param type and description non-optionalIgor Minar
2010-11-15Added basic Services, which support @memberOf and @methodOfVojta Jina
2010-10-19fix issue where script calls back before callback registered.Misko Hevery
2010-10-18inline all images into cssIgor Minar
* embedded images as data URIs * rake task to generate multipart js file with embeded images for IE * move images into a separate directory outside of src or css and keep them there for reference * clean up Rakefile and ruby code * .gitignore update * don't penalize IE 8+ with an extra request to the ie-compat.js file
2010-09-27Reworked the cookie synchronization between cookie service, $browser and ↵Igor Minar
document.cookie. Now we finally correctly handle situations when browser refuses to set a cookie, due to storage quota or other (file:// protocol) limitations.
2010-09-26Properly initialize cookie service in order to preserve existing cookiesIgor Minar
- previously the poller initialized the cookie cache too late which was causing previously existing cookies to be deleted by cookie service - refactored the poller api so that the addPollFn returns the added fn - fixed older cookie service tests - removed "this.$onEval(PRIORITY_LAST, update);" because it is not needed
2010-09-23$cookies service refactoringIgor Minar
- remove obsolete code in tests - add warning logs when maximum cookie limits (as specified via RFC 2965) were reached - non-string values will now get dropped - after each update $cookies hash will reflect the actual state of browser cookies this means that if browser drops some cookies due to cookie overflow, $cookies will reflect that - $sessionStore got renamed to $cookieStore to avoid name conflicts with html5's sessionStore
2010-09-22Refactored the Browser:Misko Hevery
- change from using prototype to inner functions to help with better compression - removed watchers (url/cookie) and introduced a poller concept - moved the checking of URL and cookie into services which register with poolers Benefits: - Smaller minified file - can call $browser.poll() from tests to simulate polling - single place where setTimeout needs to be tested - More testable $browser
2010-09-14Adding cookie serviceMisko Hevery
- Browser.cookies() - MockBrowser - $cookie service - $sessionStore
2010-08-18stringify names for better compression, remove dead functions, removed ↵Misko Hevery
underscore.js compatibility
2010-08-03added RequestHeaders to XHRMisko Hevery
2010-07-23fixed some of the IE bugsMisko Hevery
2010-07-23fixed some of the IE bugsMisko Hevery
2010-07-22fix howers which were accidently brokenMisko Hevery
2010-07-22added jsonp to resourcesMisko Hevery
2010-05-30improve error handling with elementsMisko Hevery
2010-05-26added outstanding request queueAndres Ornelas