[Libreoffice-commits] online.git: loleaflet/html

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Mar 5 14:29:21 UTC 2019


 loleaflet/html/loleaflet.html.m4 |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 20d781130a990b6d5c02280be22e45cc391307f9
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Sun Jan 27 13:27:37 2019 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Tue Mar 5 10:28:41 2019 -0400

    loleaflet: add defer attribute to the script tag
    
    A script that will not run until after the page has loaded
    
    Change-Id: I7a835138ba22e70150db4345629231c59b84973b

diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4
index 4985a29ac..a41cb47b7 100644
--- a/loleaflet/html/loleaflet.html.m4
+++ b/loleaflet/html/loleaflet.html.m4
@@ -152,7 +152,7 @@ ifelse(MOBILEAPP,[true],
       <div id="lokit-version"></div>
     </div>
 
-    <script>
+    <script defer>
 ifelse(MOBILEAPP,[true],
      [window.host = '';
       window.serviceRoot = '';
@@ -173,7 +173,7 @@ ifelse(MOBILEAPP,[true],
       window.idleTimeoutSecs = %IDLE_TIMEOUT_SECS%;
       window.tileSize = 256;])
     </script>
-  <script>
+  <script defer>
 
 dnl# For use in conditionals in JS: window.ThisIsAMobileApp, window.ThisIsTheiOSApp,
 dnl# and window.ThisIsTheGtkApp
@@ -207,14 +207,14 @@ ifelse(ANDROIDAPP,[true],
 
 ifelse(MOBILEAPP,[true],
   ifelse(DEBUG,[true],foreachq([fileJS],[LOLEAFLET_JS],
-  [    <script src="fileJS"></script>
+  [    <script src="fileJS" defer></script>
   ]),
-  [    <script src="bundle.js"></script>
+  [    <script src="bundle.js" defer></script>
   ]),
   ifelse(DEBUG,[true],foreachq([fileJS],[LOLEAFLET_JS],
-  [    <script src="%SERVICE_ROOT%/loleaflet/%VERSION%/fileJS"></script>
+  [    <script src="%SERVICE_ROOT%/loleaflet/%VERSION%/fileJS" defer></script>
   ]),
-  [    <script src="%SERVICE_ROOT%/loleaflet/%VERSION%/bundle.js"></script>
+  [    <script src="%SERVICE_ROOT%/loleaflet/%VERSION%/bundle.js" defer></script>
   ])
 )dnl
     <!--%BRANDING_JS%--> <!-- logo onclick handler -->


More information about the Libreoffice-commits mailing list