lighthouse 8.6.0-dev.20211028 → 8.6.0-dev.20211101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/report/flow.js +7 -7
- package/dist/report/standalone.js +7 -7
- package/flow-report/src/app.tsx +10 -11
- package/flow-report/src/common.tsx +11 -5
- package/flow-report/src/header.tsx +3 -3
- package/flow-report/src/sidebar/flow.tsx +3 -3
- package/flow-report/src/sidebar/sidebar.tsx +3 -3
- package/flow-report/src/summary/category.tsx +2 -2
- package/flow-report/src/util.ts +12 -12
- package/flow-report/src/wrappers/report.tsx +11 -6
- package/flow-report/test/common-test.tsx +25 -10
- package/flow-report/test/flow-report-pptr-test.ts +46 -0
- package/flow-report/test/header-test.tsx +6 -6
- package/flow-report/test/summary/category-test.tsx +5 -5
- package/flow-report/test/util-test.tsx +32 -11
- package/jest.config.js +1 -0
- package/lighthouse-cli/test/smokehouse/lighthouse-runners/bundle.js +4 -2
- package/lighthouse-cli/test/smokehouse/smokehouse.js +1 -1
- package/lighthouse-core/audits/errors-in-console.js +0 -2
- package/lighthouse-core/audits/image-aspect-ratio.js +1 -2
- package/lighthouse-core/audits/image-size-responsive.js +4 -5
- package/lighthouse-core/audits/unsized-images.js +1 -1
- package/lighthouse-core/computed/image-records.js +4 -3
- package/lighthouse-core/computed/metrics/lantern-total-blocking-time.js +3 -4
- package/lighthouse-core/computed/metrics/tbt-utils.js +57 -0
- package/lighthouse-core/computed/metrics/total-blocking-time.js +3 -53
- package/lighthouse-core/config/config-helpers.js +20 -10
- package/lighthouse-core/config/default-config.js +59 -56
- package/lighthouse-core/fraggle-rock/config/default-config.js +1 -4
- package/lighthouse-core/fraggle-rock/gather/base-gatherer.js +6 -1
- package/lighthouse-core/gather/driver/storage.js +0 -1
- package/lighthouse-core/gather/gatherers/dobetterweb/response-compression.js +1 -0
- package/lighthouse-core/gather/gatherers/image-elements.js +0 -3
- package/lighthouse-core/lib/asset-saver.js +4 -1
- package/lighthouse-core/lib/lh-env.js +2 -0
- package/lighthouse-core/lib/tappable-rects.js +8 -15
- package/lighthouse-core/runner.js +1 -1
- package/lighthouse-core/util-commonjs.js +1 -2
- package/package.json +10 -7
- package/report/clients/standalone.js +0 -2
- package/report/renderer/element-screenshot-renderer.js +2 -2
- package/report/renderer/performance-category-renderer.js +20 -5
- package/report/renderer/util.js +1 -2
- package/report/test/renderer/performance-category-renderer-test.js +34 -8
- package/report/test/renderer/report-renderer-test.js +1 -1
- package/report/test/renderer/report-ui-features-test.js +3 -0
- package/report/test/renderer/util-test.js +13 -31
- package/shared/localization/format.js +9 -4
- package/shared/localization/locales/ar-XB.json +0 -12
- package/shared/localization/locales/ar.json +0 -12
- package/shared/localization/locales/bg.json +0 -12
- package/shared/localization/locales/ca.json +0 -12
- package/shared/localization/locales/cs.json +0 -12
- package/shared/localization/locales/da.json +0 -12
- package/shared/localization/locales/de.json +0 -12
- package/shared/localization/locales/el.json +0 -12
- package/shared/localization/locales/en-GB.json +0 -12
- package/shared/localization/locales/en-US.json +1 -13
- package/shared/localization/locales/en-XA.json +0 -12
- package/shared/localization/locales/en-XL.json +1 -13
- package/shared/localization/locales/es-419.json +0 -12
- package/shared/localization/locales/es.json +0 -12
- package/shared/localization/locales/fi.json +0 -12
- package/shared/localization/locales/fil.json +0 -12
- package/shared/localization/locales/fr.json +0 -12
- package/shared/localization/locales/he.json +0 -12
- package/shared/localization/locales/hi.json +0 -12
- package/shared/localization/locales/hr.json +0 -12
- package/shared/localization/locales/hu.json +0 -12
- package/shared/localization/locales/id.json +0 -12
- package/shared/localization/locales/it.json +0 -12
- package/shared/localization/locales/ja.json +0 -12
- package/shared/localization/locales/ko.json +0 -12
- package/shared/localization/locales/lt.json +0 -12
- package/shared/localization/locales/lv.json +0 -12
- package/shared/localization/locales/nl.json +0 -12
- package/shared/localization/locales/no.json +0 -12
- package/shared/localization/locales/pl.json +0 -12
- package/shared/localization/locales/pt-PT.json +0 -12
- package/shared/localization/locales/pt.json +0 -12
- package/shared/localization/locales/ro.json +0 -12
- package/shared/localization/locales/ru.json +0 -12
- package/shared/localization/locales/sk.json +0 -12
- package/shared/localization/locales/sl.json +0 -12
- package/shared/localization/locales/sr-Latn.json +0 -12
- package/shared/localization/locales/sr.json +0 -12
- package/shared/localization/locales/sv.json +0 -12
- package/shared/localization/locales/ta.json +0 -12
- package/shared/localization/locales/te.json +0 -12
- package/shared/localization/locales/th.json +0 -12
- package/shared/localization/locales/tr.json +0 -12
- package/shared/localization/locales/uk.json +0 -12
- package/shared/localization/locales/vi.json +0 -12
- package/shared/localization/locales/zh-HK.json +0 -12
- package/shared/localization/locales/zh-TW.json +0 -12
- package/shared/localization/locales/zh.json +0 -12
- package/third-party/chromium-synchronization/installability-errors-test.js +2 -0
- package/types/artifacts.d.ts +5 -4
- package/types/lhr/flow.d.ts +3 -2
- package/types/rollup-plugin-postprocess.d.ts +10 -0
- package/lighthouse-core/audits/dobetterweb/appcache-manifest.js +0 -67
- package/lighthouse-core/gather/gatherers/dobetterweb/appcache.js +0 -34
|
@@ -743,18 +743,6 @@
|
|
|
743
743
|
"lighthouse-core/audits/deprecations.js | title": {
|
|
744
744
|
"message": "หลีกเลี่ยงการใช้ API ที่เลิกใช้งานแล้ว"
|
|
745
745
|
},
|
|
746
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | description": {
|
|
747
|
-
"message": "แคชของแอปพลิเคชันเลิกใช้งานแล้ว [ดูข้อมูลเพิ่มเติม](https://web.dev/appcache-manifest/)"
|
|
748
|
-
},
|
|
749
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | displayValue": {
|
|
750
|
-
"message": "พบ \"{AppCacheManifest}\""
|
|
751
|
-
},
|
|
752
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | failureTitle": {
|
|
753
|
-
"message": "ใช้แคชของแอปพลิเคชัน"
|
|
754
|
-
},
|
|
755
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | title": {
|
|
756
|
-
"message": "หลีกเลี่ยงการใช้แคชของแอปพลิเคชัน"
|
|
757
|
-
},
|
|
758
746
|
"lighthouse-core/audits/dobetterweb/charset.js | description": {
|
|
759
747
|
"message": "จำเป็นต้องประกาศการเข้ารหัสอักขระ ซึ่งทำได้โดยใช้แท็ก `<meta>` ใน 1024 ไบต์แรกของ HTML หรือในส่วนหัวการตอบกลับ HTTP ประเภทเนื้อหา [ดูข้อมูลเพิ่มเติม](https://web.dev/charset/)"
|
|
760
748
|
},
|
|
@@ -743,18 +743,6 @@
|
|
|
743
743
|
"lighthouse-core/audits/deprecations.js | title": {
|
|
744
744
|
"message": "Kullanımdan kaldırılan API'leri içermiyor"
|
|
745
745
|
},
|
|
746
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | description": {
|
|
747
|
-
"message": "Application Cache API'si kullanımdan kaldırılmıştır. [Daha fazla bilgi](https://web.dev/appcache-manifest/)."
|
|
748
|
-
},
|
|
749
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | displayValue": {
|
|
750
|
-
"message": "\"{AppCacheManifest}\" bulundu"
|
|
751
|
-
},
|
|
752
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | failureTitle": {
|
|
753
|
-
"message": "Uygulama Önbelleği Kullanma"
|
|
754
|
-
},
|
|
755
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | title": {
|
|
756
|
-
"message": "Uygulama Önbelleği Kullanılmıyor"
|
|
757
|
-
},
|
|
758
746
|
"lighthouse-core/audits/dobetterweb/charset.js | description": {
|
|
759
747
|
"message": "Karakter kodlama tanımlaması gerekiyor. Bu, HTML'nin ilk 1.024 baytı içinde veya İçerik Türü HTTP yanıt başlığında bir `<meta>` etiketi ile yapılabilir. [Daha fazla bilgi edinin](https://web.dev/charset/)."
|
|
760
748
|
},
|
|
@@ -743,18 +743,6 @@
|
|
|
743
743
|
"lighthouse-core/audits/deprecations.js | title": {
|
|
744
744
|
"message": "Уникає інтерфейсів API, які більше не підтримуються"
|
|
745
745
|
},
|
|
746
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | description": {
|
|
747
|
-
"message": "Application Cache API більше не підтримується. [Докладніше](https://web.dev/appcache-manifest/)."
|
|
748
|
-
},
|
|
749
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | displayValue": {
|
|
750
|
-
"message": "Знайдено кеш \"{AppCacheManifest}\""
|
|
751
|
-
},
|
|
752
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | failureTitle": {
|
|
753
|
-
"message": "Використовує кеш додатка"
|
|
754
|
-
},
|
|
755
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | title": {
|
|
756
|
-
"message": "Уникає кешу додатка"
|
|
757
|
-
},
|
|
758
746
|
"lighthouse-core/audits/dobetterweb/charset.js | description": {
|
|
759
747
|
"message": "Декларація кодування символів обов'язкова. Це можна зробити за допомогою тегу `<meta>` в перших 1024 байтах HTML або в заголовку відповіді HTTP \"Content-Type\". [Докладніше](https://web.dev/charset/)."
|
|
760
748
|
},
|
|
@@ -743,18 +743,6 @@
|
|
|
743
743
|
"lighthouse-core/audits/deprecations.js | title": {
|
|
744
744
|
"message": "Tránh các API không dùng nữa"
|
|
745
745
|
},
|
|
746
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | description": {
|
|
747
|
-
"message": "Bộ nhớ đệm của ứng dụng không còn dùng nữa. [Tìm hiểu thêm](https://web.dev/appcache-manifest/)."
|
|
748
|
-
},
|
|
749
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | displayValue": {
|
|
750
|
-
"message": "Tìm thấy \"{AppCacheManifest}\""
|
|
751
|
-
},
|
|
752
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | failureTitle": {
|
|
753
|
-
"message": "Dùng bộ nhớ đệm của ứng dụng"
|
|
754
|
-
},
|
|
755
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | title": {
|
|
756
|
-
"message": "Tránh sử dụng bộ nhớ đệm của ứng dụng"
|
|
757
|
-
},
|
|
758
746
|
"lighthouse-core/audits/dobetterweb/charset.js | description": {
|
|
759
747
|
"message": "Cần khai báo hệ thống mã hóa ký tự. Bạn có thể thực hiện việc này bằng thẻ `<meta>` trong 1024 byte đầu tiên của HTML hoặc trong tiêu đề phản hồi HTTP Loại–Nội dung. [Tìm hiểu thêm](https://web.dev/charset/)."
|
|
760
748
|
},
|
|
@@ -743,18 +743,6 @@
|
|
|
743
743
|
"lighthouse-core/audits/deprecations.js | title": {
|
|
744
744
|
"message": "避免使用已淘汰的 API"
|
|
745
745
|
},
|
|
746
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | description": {
|
|
747
|
-
"message": "應用程式快取已被淘汰。[瞭解詳情](https://web.dev/appcache-manifest/)。"
|
|
748
|
-
},
|
|
749
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | displayValue": {
|
|
750
|
-
"message": "已找到「{AppCacheManifest}」"
|
|
751
|
-
},
|
|
752
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | failureTitle": {
|
|
753
|
-
"message": "使用應用程式快取"
|
|
754
|
-
},
|
|
755
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | title": {
|
|
756
|
-
"message": "避免使用應用程式快取"
|
|
757
|
-
},
|
|
758
746
|
"lighthouse-core/audits/dobetterweb/charset.js | description": {
|
|
759
747
|
"message": "需要字元編碼宣告。可以在 HTML 的前 1024 個字節或 Content-Type HTTP 回應標題中使用 `<meta>` 標記宣告。[瞭解詳情](https://web.dev/charset/)。"
|
|
760
748
|
},
|
|
@@ -743,18 +743,6 @@
|
|
|
743
743
|
"lighthouse-core/audits/deprecations.js | title": {
|
|
744
744
|
"message": "避免使用已淘汰的 API"
|
|
745
745
|
},
|
|
746
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | description": {
|
|
747
|
-
"message": "應用程式快取已遭到淘汰。[瞭解詳情](https://web.dev/appcache-manifest/)。"
|
|
748
|
-
},
|
|
749
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | displayValue": {
|
|
750
|
-
"message": "已找到「{AppCacheManifest}」"
|
|
751
|
-
},
|
|
752
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | failureTitle": {
|
|
753
|
-
"message": "使用應用程式快取"
|
|
754
|
-
},
|
|
755
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | title": {
|
|
756
|
-
"message": "避免使用應用程式快取"
|
|
757
|
-
},
|
|
758
746
|
"lighthouse-core/audits/dobetterweb/charset.js | description": {
|
|
759
747
|
"message": "必須定義字元編碼宣告。你可以在 HTML 的前 1024 個位元組中使用 `<meta>` 標記定義,或在 Content-Type HTTP 回應標頭中定義。[瞭解詳情](https://web.dev/charset/)。"
|
|
760
748
|
},
|
|
@@ -743,18 +743,6 @@
|
|
|
743
743
|
"lighthouse-core/audits/deprecations.js | title": {
|
|
744
744
|
"message": "请勿使用已弃用的 API"
|
|
745
745
|
},
|
|
746
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | description": {
|
|
747
|
-
"message": "应用缓存已被弃用。[了解详情](https://web.dev/appcache-manifest/)。"
|
|
748
|
-
},
|
|
749
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | displayValue": {
|
|
750
|
-
"message": "发现了“{AppCacheManifest}”"
|
|
751
|
-
},
|
|
752
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | failureTitle": {
|
|
753
|
-
"message": "使用了应用缓存"
|
|
754
|
-
},
|
|
755
|
-
"lighthouse-core/audits/dobetterweb/appcache-manifest.js | title": {
|
|
756
|
-
"message": "请勿使用应用缓存"
|
|
757
|
-
},
|
|
758
746
|
"lighthouse-core/audits/dobetterweb/charset.js | description": {
|
|
759
747
|
"message": "必须声明字符编码。您可以在 HTML 的前 1024 个字节中使用 `<meta>` 标记来声明,也可以在 HTTP 响应标头 Content-Type 中进行声明。[了解详情](https://web.dev/charset/)。"
|
|
760
748
|
},
|
package/types/artifacts.d.ts
CHANGED
|
@@ -122,8 +122,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts,LegacyBaseArt
|
|
|
122
122
|
Accessibility: Artifacts.Accessibility;
|
|
123
123
|
/** Array of all anchors on the page. */
|
|
124
124
|
AnchorElements: Artifacts.AnchorElement[];
|
|
125
|
-
/** The value of the page's <html> manifest attribute, or null if not defined */
|
|
126
|
-
AppCacheManifest: string | null;
|
|
127
125
|
/** Array of all URLs cached in CacheStorage. */
|
|
128
126
|
CacheContents: string[];
|
|
129
127
|
/** CSS coverage information for styles used by page's final state. */
|
|
@@ -489,8 +487,6 @@ declare module Artifacts {
|
|
|
489
487
|
isPicture: boolean;
|
|
490
488
|
/** Flags whether this element was contained within a ShadowRoot */
|
|
491
489
|
isInShadowDOM: boolean;
|
|
492
|
-
/** The MIME type of the underlying image file. */
|
|
493
|
-
mimeType?: string;
|
|
494
490
|
/** Details for node in DOM for the image element */
|
|
495
491
|
node: NodeDetails;
|
|
496
492
|
/** The loading attribute of the image. */
|
|
@@ -873,6 +869,11 @@ declare module Artifacts {
|
|
|
873
869
|
}
|
|
874
870
|
|
|
875
871
|
type ConsoleMessage = ConsoleAPICall | ConsoleException | ConsoleProtocolLog;
|
|
872
|
+
|
|
873
|
+
interface ImageElementRecord extends ImageElement {
|
|
874
|
+
/** The MIME type of the underlying image file. */
|
|
875
|
+
mimeType?: string;
|
|
876
|
+
}
|
|
876
877
|
}
|
|
877
878
|
|
|
878
879
|
export interface Trace {
|
package/types/lhr/flow.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright 2021 The Lighthouse Authors. All Rights Reserved.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
declare module '@stadtlandnetz/rollup-plugin-postprocess' {
|
|
8
|
+
function postprocess(args: Array<[RegExp, string]>): void;
|
|
9
|
+
export = postprocess;
|
|
10
|
+
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright 2016 The Lighthouse Authors. All Rights Reserved.
|
|
3
|
-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4
|
-
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @fileoverview Audit a page to ensure it is not using the Application Cache API.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
const Audit = require('../audit.js');
|
|
14
|
-
const i18n = require('../../lib/i18n/i18n.js');
|
|
15
|
-
|
|
16
|
-
const UIStrings = {
|
|
17
|
-
/** Title of a Lighthouse audit that provides detail on the use of the Application Cache API. This descriptive title is shown to users when they do not use the Application Cache API. */
|
|
18
|
-
title: 'Avoids Application Cache',
|
|
19
|
-
/** Title of a Lighthouse audit that provides detail on the use of the Application Cache API. This descriptive title is shown to users when they do use the Application Cache API, which is considered bad practice. */
|
|
20
|
-
failureTitle: 'Uses Application Cache',
|
|
21
|
-
/** Description of a Lighthouse audit that tells the user why they should not use the Application Cache API. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
|
|
22
|
-
description: 'Application Cache is deprecated. ' +
|
|
23
|
-
'[Learn more](https://web.dev/appcache-manifest/).',
|
|
24
|
-
/**
|
|
25
|
-
* @description Label for the audit identifying uses of the Application Cache.
|
|
26
|
-
* @example {clock.appcache} AppCacheManifest
|
|
27
|
-
*/
|
|
28
|
-
displayValue: 'Found "{AppCacheManifest}"',
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
32
|
-
|
|
33
|
-
class AppCacheManifestAttr extends Audit {
|
|
34
|
-
/**
|
|
35
|
-
* @return {LH.Audit.Meta}
|
|
36
|
-
*/
|
|
37
|
-
static get meta() {
|
|
38
|
-
return {
|
|
39
|
-
id: 'appcache-manifest',
|
|
40
|
-
title: str_(UIStrings.title),
|
|
41
|
-
failureTitle: str_(UIStrings.failureTitle),
|
|
42
|
-
description: str_(UIStrings.description),
|
|
43
|
-
requiredArtifacts: ['AppCacheManifest'],
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @param {LH.Artifacts} artifacts
|
|
49
|
-
* @return {LH.Audit.Product}
|
|
50
|
-
*/
|
|
51
|
-
static audit(artifacts) {
|
|
52
|
-
// Fails if an AppCacheManifest was found.
|
|
53
|
-
if (artifacts.AppCacheManifest !== null) {
|
|
54
|
-
return {
|
|
55
|
-
score: 0,
|
|
56
|
-
displayValue: str_(UIStrings.displayValue, {AppCacheManifest: artifacts.AppCacheManifest}),
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
score: 1,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
module.exports = AppCacheManifestAttr;
|
|
67
|
-
module.exports.UIStrings = UIStrings;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright 2016 The Lighthouse Authors. All Rights Reserved.
|
|
3
|
-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4
|
-
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
|
-
*/
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
|
-
const FRGatherer = require('../../../fraggle-rock/gather/base-gatherer.js');
|
|
9
|
-
|
|
10
|
-
/* global document */
|
|
11
|
-
|
|
12
|
-
class AppCacheManifest extends FRGatherer {
|
|
13
|
-
/** @type {LH.Gatherer.GathererMeta} */
|
|
14
|
-
meta = {
|
|
15
|
-
supportedModes: ['snapshot', 'navigation'],
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @param {LH.Gatherer.FRTransitionalContext} passContext
|
|
20
|
-
* @return {Promise<LH.Artifacts['AppCacheManifest']>}
|
|
21
|
-
*/
|
|
22
|
-
getArtifact(passContext) {
|
|
23
|
-
const driver = passContext.driver;
|
|
24
|
-
|
|
25
|
-
return driver.executionContext.evaluate(() => {
|
|
26
|
-
return document.documentElement && document.documentElement.getAttribute('manifest');
|
|
27
|
-
}, {
|
|
28
|
-
args: [],
|
|
29
|
-
useIsolation: true,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
module.exports = AppCacheManifest;
|