aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/browser.js
diff options
context:
space:
mode:
authorIgor Minar2012-04-09 14:27:14 -0700
committerIgor Minar2012-04-09 17:59:47 -0700
commitfbaa1968b7c596ccb63ea8b4be1d3bd92eda50d8 (patch)
treef67c6b8cf724431efead5197cced66dc2340f9f5 /src/ng/browser.js
parent13d5528a5f5a2f0feee5c742788a914d2371841e (diff)
downloadangular.js-fbaa1968b7c596ccb63ea8b4be1d3bd92eda50d8.tar.bz2
chore($browser): remove the addJs method
this was never meant to be a public api used by apps. I refactored the code to hide the functionality. BREAKING CHANGE: $browser.addJs method was removed apps that depended on this functionality should either use many of the existing script loaders or create a simple helper method specific to the app.
Diffstat (limited to 'src/ng/browser.js')
-rw-r--r--src/ng/browser.js33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/ng/browser.js b/src/ng/browser.js
index 376c3fd4..465114c5 100644
--- a/src/ng/browser.js
+++ b/src/ng/browser.js
@@ -343,39 +343,6 @@ function Browser(window, document, body, $log, $sniffer) {
// Misc API
//////////////////////////////////////////////////////////////
-
- /**
- * @ngdoc method
- * @name angular.module.ng.$browser#addJs
- * @methodOf angular.module.ng.$browser
- *
- * @param {string} url Url to js file
- *
- * @description
- * Adds a script tag to the head.
- */
- self.addJs = function(url, done) {
- // we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.:
- // - fetches local scripts via XHR and evals them
- // - adds and immediately removes script elements from the document
- var script = rawDocument.createElement('script');
-
- script.type = 'text/javascript';
- script.src = url;
-
- if (msie) {
- script.onreadystatechange = function() {
- /loaded|complete/.test(script.readyState) && done && done();
- };
- } else {
- if (done) script.onload = script.onerror = done;
- }
-
- body[0].appendChild(script);
-
- return script;
- };
-
/**
* Returns current <base href>
* (always relative - without domain)