summaryrefslogtreecommitdiff
path: root/chromium/third_party/catapult/tracing/tracing/extras/importer/jszip.html
blob: 5db6c4bbfc3d1bc73e49c02d619fcfd5fcf3bde1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<!--
Copyright (c) 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/tracing/base/base.html">

<script>
'use strict';
// Vinn workaround for JSzip requiring window.
if (tr.isVinn) {
  /**
   * Hack.
   */
  global.window = {};
}
</script>
<script src="/jszip.min.js"></script>
<script>
'use strict';
// Vinn workaround for JSzip requiring window.
if (tr.isVinn) {
  /**
   * Hack.
   */
  global.JSZip = global.window.JSZip;
  global.window = undefined;
} else if (tr.isNode) {
  const jsZipAbsPath = HTMLImportsLoader.hrefToAbsolutePath(
      '/jszip.min.js');
  const jsZipModule = require(jsZipAbsPath);
  global.JSZip = jsZipModule;
}
</script>