[Pkg-javascript-commits] [less.js] 176/285: A few tweaks to browser loading

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:23:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v2.0.0
in repository less.js.

commit 8b42ae388305a9c8e38ddbbc97f0f374d96342c2
Author: Luke Page <luke.a.page at gmail.com>
Date:   Fri Oct 17 08:12:52 2014 +0100

    A few tweaks to browser loading
---
 lib/less-browser/index.js | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/lib/less-browser/index.js b/lib/less-browser/index.js
index e5219c2..b6420f7 100644
--- a/lib/less-browser/index.js
+++ b/lib/less-browser/index.js
@@ -248,7 +248,7 @@ less.modifyVars = function(record) {
 };
 
 less.refresh = function (reload, modifyVars) {
-    less.hasFinished = new PromiseConstructor(function (resolve, reject) {
+    return new PromiseConstructor(function (resolve, reject) {
         var startTime, endTime, totalMilliseconds;
         startTime = endTime = new Date();
 
@@ -278,17 +278,15 @@ less.refresh = function (reload, modifyVars) {
             }
             endTime = new Date();
         }, reload, modifyVars);
-    
+
         loadStyles(modifyVars);
     });
-
-    return less.hasFinished;
 };
 
 less.refreshStyles = loadStyles;
 
-less.registerStylesheets().then(
+less.pageLoadFinished = less.registerStylesheets().then(
     function () {
-        less.refresh(less.env === 'development');
+        return less.refresh(less.env === 'development');
     }
 );

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list