ソースを参照

fix(css): load css before js

Currently all.css is loaded after app.js. This means there may
not be a guarantee that the css is loaded before the js, which
is bad because the js does dom querying for sizes on elements,
but some element sizes will be affected by js. So instead load
css upfront and let the browser block as needed or at least
give the css a head start in racing javascript to load.
j8
Leonard Kim 7年前
コミット
b74b29e8a0
2個のファイルの変更6行の追加2行の削除
  1. 3
    1
      index.html
  2. 3
    1
      static/deviceSelectionPopup.html

+ 3
- 1
index.html ファイルの表示

@@ -4,6 +4,9 @@
4 4
     <meta http-equiv="content-type" content="text/html;charset=utf-8">
5 5
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 6
     <!--#include virtual="base.html" -->
7
+
8
+    <link rel="stylesheet" href="css/all.css">
9
+
7 10
     <script>
8 11
         window.indexLoadedTime = window.performance.now();
9 12
         console.log("(TIME) index.html loaded:\t", indexLoadedTime);
@@ -134,7 +137,6 @@
134 137
     <script src="libs/lib-jitsi-meet.min.js?v=139"></script>
135 138
     <script src="libs/app.bundle.min.js?v=139"></script>
136 139
     <!--#include virtual="title.html" -->
137
-    <link rel="stylesheet" href="css/all.css">
138 140
     <!--#include virtual="plugin.head.html" -->
139 141
   </head>
140 142
   <body>

+ 3
- 1
static/deviceSelectionPopup.html ファイルの表示

@@ -4,6 +4,9 @@
4 4
     <meta http-equiv="content-type" content="text/html;charset=utf-8">
5 5
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 6
     <base href="../" />
7
+
8
+    <link rel="stylesheet" href="css/all.css">
9
+
7 10
     <!--#include virtual="/title.html" -->
8 11
     <script><!--#include virtual="/interface_config.js" --></script>
9 12
     <script>
@@ -11,7 +14,6 @@
11 14
     </script>
12 15
     <script src="libs/lib-jitsi-meet.min.js?v=139"></script>
13 16
     <script src="libs/device_selection_popup_bundle.min.js?v=1"></script>
14
-    <link rel="stylesheet" href="css/all.css">
15 17
   </head>
16 18
   <body>
17 19
     <div id="react"></div>

読み込み中…
キャンセル
保存