diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-01-17 14:05:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-17 14:05:31 +0100 |
commit | ecc37f5faf53fb873aabddca5487caffda7d5685 (patch) | |
tree | 9b12aa30926830903d8b04898c738c752f06f530 /core/js/js.js | |
parent | ac6ee0b8b7d06deb5285b99ed55df5baae9d821f (diff) | |
parent | 64b5c0c942b5170cc47308f33d2070387f22b929 (diff) | |
download | nextcloud-server-ecc37f5faf53fb873aabddca5487caffda7d5685.tar.gz nextcloud-server-ecc37f5faf53fb873aabddca5487caffda7d5685.zip |
Merge pull request #13407 from nextcloud/js-async-loading
Plain javascript api to asynchronously load javascript or css files
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js index a99a6d547d7..e306e2a7369 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -39,7 +39,7 @@ function escapeHTML(s) { } /** @namespace OCP */ -var OCP = {}, +var OCP = Object.assign({}, window.OCP), /** * @namespace OC */ @@ -367,6 +367,7 @@ var OCP = {}, * @param {string} app the app id to which the script belongs * @param {string} script the filename of the script * @param ready event handler to be called when the script is loaded + * @deprecated 16.0.0 Use OCP.Loader.loadScript */ addScript:function(app,script,ready){ var deferred, path=OC.filePath(app,'js',script+'.js'); @@ -387,6 +388,7 @@ var OCP = {}, * Loads a CSS file * @param {string} app the app id to which the css style belongs * @param {string} style the filename of the css file + * @deprecated 16.0.0 Use OCP.Loader.loadStylesheet */ addStyle:function(app,style){ var path=OC.filePath(app,'css',style+'.css'); @@ -1352,7 +1354,9 @@ function initCore() { // css variables fallback for IE if (msie > 0 || trident > 0) { - cssVars(); + cssVars({ + watch: true + }); } $(window).on('unload.main', function() { |