happy-dom 8.4.0 → 8.4.2

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.

Potentially problematic release.


This version of happy-dom might be problematic. Click here for more details.

@@ -9,29 +9,102 @@ import PluginArray from './PluginArray';
9
9
  * https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator.
10
10
  */
11
11
  export default class Navigator {
12
- readonly cookieEnabled: boolean;
13
- readonly credentials: string;
14
- readonly geolocation: string;
15
- readonly language: string;
16
- readonly languages: string[];
17
- readonly locks: string;
18
- readonly maxTouchPoints: number;
19
- readonly hardwareConcurrency: number;
20
- readonly appCodeName: string;
21
- readonly appName: string;
22
- readonly appVersion: string;
23
- readonly platform: string;
24
- readonly product: string;
25
- readonly productSub: string;
26
- readonly vendor: string;
27
- readonly vendorSub: string;
28
- readonly userAgent: string;
29
- readonly onLine: boolean;
30
- readonly permissions: string;
31
- readonly webdriver: boolean;
32
- readonly doNotTrack: string;
33
- readonly mimeTypes: MimeTypeArray;
34
- readonly plugins: PluginArray;
12
+ /**
13
+ * False if setting a cookie will be ignored and true otherwise.
14
+ */
15
+ get cookieEnabled(): boolean;
16
+ /**
17
+ * TODO: Not implemented.
18
+ */
19
+ get credentials(): string;
20
+ /**
21
+ * TODO: Not implemented.
22
+ */
23
+ get geolocation(): string;
24
+ /**
25
+ * String representing the preferred language of the user, usually the language of the browser UI.
26
+ */
27
+ get language(): string;
28
+ /**
29
+ * Array of string representing the user's preferred languages.
30
+ */
31
+ get languages(): string[];
32
+ /**
33
+ * TODO: Not implemented.
34
+ */
35
+ get locks(): string;
36
+ /**
37
+ * Maximum number of simultaneous touch contact points are supported by the current device.
38
+ */
39
+ get maxTouchPoints(): number;
40
+ /**
41
+ * Number of logical processors available to run threads on the user's computer.
42
+ */
43
+ get hardwareConcurrency(): number;
44
+ /**
45
+ * Browser app code name.
46
+ */
47
+ get appCodeName(): string;
48
+ /**
49
+ * Browser app name.
50
+ */
51
+ get appName(): string;
52
+ /**
53
+ * Browser app version.
54
+ */
55
+ get appVersion(): string;
56
+ /**
57
+ * Browser platform.
58
+ */
59
+ get platform(): string;
60
+ /**
61
+ * Browser product.
62
+ */
63
+ get product(): string;
64
+ /**
65
+ * Browser product sub.
66
+ */
67
+ get productSub(): string;
68
+ /**
69
+ * Browser vendor.
70
+ */
71
+ get vendor(): string;
72
+ /**
73
+ * Browser vendor sub.
74
+ */
75
+ get vendorSub(): string;
76
+ /**
77
+ * Browser user agent.
78
+ *
79
+ * "appCodeName/appVersion number (Platform; Security; OS-or-CPU; Localization; rv: revision-version-number) product/productSub Application-Name Application-Name-version".
80
+ */
81
+ get userAgent(): string;
82
+ /**
83
+ * Boolean value indicating whether the browser is working online.
84
+ */
85
+ get onLine(): boolean;
86
+ /**
87
+ * TODO: Not implemented.
88
+ */
89
+ get permissions(): string;
90
+ /**
91
+ * Boolean Indicates whether the user agent is controlled by automation.
92
+ */
93
+ get webdriver(): boolean;
94
+ /**
95
+ * The user's Do Not Track setting, which indicates whether the user is requesting web sites and advertisers to not track them.
96
+ *
97
+ * The value of the property reflects that of the DNT HTTP header, i.e. Values of "1", "0", or "unspecified".
98
+ */
99
+ get doNotTrack(): string;
100
+ /**
101
+ * Browser mime-types.
102
+ */
103
+ get mimeTypes(): MimeTypeArray;
104
+ /**
105
+ * Browser plugins.
106
+ */
107
+ get plugins(): PluginArray;
35
108
  /**
36
109
  * Returns the object as a string.
37
110
  *
@@ -14,55 +14,147 @@ const PluginArray_1 = __importDefault(require("./PluginArray"));
14
14
  * https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator.
15
15
  */
16
16
  class Navigator {
17
- constructor() {
18
- // False if setting a cookie will be ignored and true otherwise.
19
- this.cookieEnabled = true;
20
- // TODO: Not implemented.
21
- this.credentials = null;
22
- // TODO: Not implemented.
23
- this.geolocation = null;
24
- // String representing the preferred language of the user, usually the language of the browser UI.
25
- this.language = 'en-US';
26
- // Array of string representing the user's preferred languages.
27
- this.languages = ['en-US', 'en'];
28
- // TODO: Not implemented.
29
- this.locks = null;
30
- // Maximum number of simultaneous touch contact points are supported by the current device.
31
- this.maxTouchPoints = 0;
32
- // Number of logical processors available to run threads on the user's computer.
33
- this.hardwareConcurrency = 8;
34
- // Browser app code name.
35
- this.appCodeName = 'Mozilla';
36
- // Browser app name.
37
- this.appName = 'Netscape';
38
- // Browser app version.
39
- this.appVersion = '5.0 (Windows)';
40
- // Browser platform.
41
- this.platform = 'Win32';
42
- // Browser product.
43
- this.product = 'Gecko';
44
- // Browser product sub.
45
- this.productSub = '20100101';
46
- // Browser vendor.
47
- this.vendor = '';
48
- // Browser vendor sub.
49
- this.vendorSub = '';
50
- // Browser user agent.
51
- // "appCodeName/appVersion number (Platform; Security; OS-or-CPU; Localization; rv: revision-version-number) product/productSub Application-Name Application-Name-version".
52
- this.userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0';
53
- // Boolean value indicating whether the browser is working online.
54
- this.onLine = true;
55
- // TODO: Not implemented.
56
- this.permissions = null;
57
- // Boolean Indicates whether the user agent is controlled by automation.
58
- this.webdriver = true;
59
- // The user's Do Not Track setting, which indicates whether the user is requesting web sites and advertisers to not track them.
60
- // The value of the property reflects that of the DNT HTTP header, i.e. Values of "1", "0", or "unspecified".
61
- this.doNotTrack = 'unspecified';
62
- // Browser mime-types.
63
- this.mimeTypes = new MimeTypeArray_1.default([]);
64
- // Browser plugins.
65
- this.plugins = new PluginArray_1.default([]);
17
+ /**
18
+ * False if setting a cookie will be ignored and true otherwise.
19
+ */
20
+ get cookieEnabled() {
21
+ return true;
22
+ }
23
+ /**
24
+ * TODO: Not implemented.
25
+ */
26
+ get credentials() {
27
+ return null;
28
+ }
29
+ /**
30
+ * TODO: Not implemented.
31
+ */
32
+ get geolocation() {
33
+ return null;
34
+ }
35
+ /**
36
+ * String representing the preferred language of the user, usually the language of the browser UI.
37
+ */
38
+ get language() {
39
+ return 'en-US';
40
+ }
41
+ /**
42
+ * Array of string representing the user's preferred languages.
43
+ */
44
+ get languages() {
45
+ return ['en-US', 'en'];
46
+ }
47
+ /**
48
+ * TODO: Not implemented.
49
+ */
50
+ get locks() {
51
+ return null;
52
+ }
53
+ /**
54
+ * Maximum number of simultaneous touch contact points are supported by the current device.
55
+ */
56
+ get maxTouchPoints() {
57
+ return 0;
58
+ }
59
+ /**
60
+ * Number of logical processors available to run threads on the user's computer.
61
+ */
62
+ get hardwareConcurrency() {
63
+ return 8;
64
+ }
65
+ /**
66
+ * Browser app code name.
67
+ */
68
+ get appCodeName() {
69
+ return 'Mozilla';
70
+ }
71
+ /**
72
+ * Browser app name.
73
+ */
74
+ get appName() {
75
+ return 'Netscape';
76
+ }
77
+ /**
78
+ * Browser app version.
79
+ */
80
+ get appVersion() {
81
+ return '5.0 (Windows)';
82
+ }
83
+ /**
84
+ * Browser platform.
85
+ */
86
+ get platform() {
87
+ return 'Win32';
88
+ }
89
+ /**
90
+ * Browser product.
91
+ */
92
+ get product() {
93
+ return 'Gecko';
94
+ }
95
+ /**
96
+ * Browser product sub.
97
+ */
98
+ get productSub() {
99
+ return '20100101';
100
+ }
101
+ /**
102
+ * Browser vendor.
103
+ */
104
+ get vendor() {
105
+ return '';
106
+ }
107
+ /**
108
+ * Browser vendor sub.
109
+ */
110
+ get vendorSub() {
111
+ return '';
112
+ }
113
+ /**
114
+ * Browser user agent.
115
+ *
116
+ * "appCodeName/appVersion number (Platform; Security; OS-or-CPU; Localization; rv: revision-version-number) product/productSub Application-Name Application-Name-version".
117
+ */
118
+ get userAgent() {
119
+ return 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0';
120
+ }
121
+ /**
122
+ * Boolean value indicating whether the browser is working online.
123
+ */
124
+ get onLine() {
125
+ return true;
126
+ }
127
+ /**
128
+ * TODO: Not implemented.
129
+ */
130
+ get permissions() {
131
+ return null;
132
+ }
133
+ /**
134
+ * Boolean Indicates whether the user agent is controlled by automation.
135
+ */
136
+ get webdriver() {
137
+ return true;
138
+ }
139
+ /**
140
+ * The user's Do Not Track setting, which indicates whether the user is requesting web sites and advertisers to not track them.
141
+ *
142
+ * The value of the property reflects that of the DNT HTTP header, i.e. Values of "1", "0", or "unspecified".
143
+ */
144
+ get doNotTrack() {
145
+ return 'unspecified';
146
+ }
147
+ /**
148
+ * Browser mime-types.
149
+ */
150
+ get mimeTypes() {
151
+ return new MimeTypeArray_1.default([]);
152
+ }
153
+ /**
154
+ * Browser plugins.
155
+ */
156
+ get plugins() {
157
+ return new PluginArray_1.default([]);
66
158
  }
67
159
  /**
68
160
  * Returns the object as a string.
@@ -1 +1 @@
1
- {"version":3,"file":"Navigator.js","sourceRoot":"","sources":["../../src/navigator/Navigator.ts"],"names":[],"mappings":";;;;;AAAA,oEAA4C;AAC5C,gEAAwC;AAExC;;;;;;;GAOG;AACH,MAAqB,SAAS;IAA9B;QACC,gEAAgE;QAChD,kBAAa,GAAY,IAAI,CAAC;QAE9C,yBAAyB;QACT,gBAAW,GAAW,IAAI,CAAC;QAE3C,yBAAyB;QACT,gBAAW,GAAW,IAAI,CAAC;QAE3C,kGAAkG;QAClF,aAAQ,GAAW,OAAO,CAAC;QAE3C,+DAA+D;QAC/C,cAAS,GAAa,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAEtD,yBAAyB;QACT,UAAK,GAAW,IAAI,CAAC;QAErC,2FAA2F;QAC3E,mBAAc,GAAW,CAAC,CAAC;QAE3C,gFAAgF;QAChE,wBAAmB,GAAW,CAAC,CAAC;QAEhD,yBAAyB;QACT,gBAAW,GAAW,SAAS,CAAC;QAEhD,oBAAoB;QACJ,YAAO,GAAW,UAAU,CAAC;QAE7C,uBAAuB;QACP,eAAU,GAAW,eAAe,CAAC;QAErD,oBAAoB;QACJ,aAAQ,GAAW,OAAO,CAAC;QAE3C,mBAAmB;QACH,YAAO,GAAW,OAAO,CAAC;QAE1C,uBAAuB;QACP,eAAU,GAAW,UAAU,CAAC;QAEhD,kBAAkB;QACF,WAAM,GAAW,EAAE,CAAC;QAEpC,sBAAsB;QACN,cAAS,GAAW,EAAE,CAAC;QAEvC,sBAAsB;QACtB,2KAA2K;QAC3J,cAAS,GACxB,gFAAgF,CAAC;QAElF,kEAAkE;QAClD,WAAM,GAAY,IAAI,CAAC;QAEvC,yBAAyB;QACT,gBAAW,GAAW,IAAI,CAAC;QAE3C,wEAAwE;QACxD,cAAS,GAAY,IAAI,CAAC;QAE1C,+HAA+H;QAC/H,6GAA6G;QAC7F,eAAU,GAAW,aAAa,CAAC;QAEnD,sBAAsB;QACN,cAAS,GAAkB,IAAI,uBAAa,CAAC,EAAE,CAAC,CAAC;QAEjE,mBAAmB;QACH,YAAO,GAAgB,IAAI,qBAAW,CAAC,EAAE,CAAC,CAAC;IAU5D,CAAC;IARA;;;;OAIG;IACI,QAAQ;QACd,OAAO,oBAAoB,CAAC;IAC7B,CAAC;CACD;AAjFD,4BAiFC"}
1
+ {"version":3,"file":"Navigator.js","sourceRoot":"","sources":["../../src/navigator/Navigator.ts"],"names":[],"mappings":";;;;;AAAA,oEAA4C;AAC5C,gEAAwC;AAExC;;;;;;;GAOG;AACH,MAAqB,SAAS;IAC7B;;OAEG;IACH,IAAW,aAAa;QACvB,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACH,IAAW,WAAW;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACH,IAAW,WAAW;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QAClB,OAAO,OAAO,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QACnB,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACf,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACH,IAAW,cAAc;QACxB,OAAO,CAAC,CAAC;IACV,CAAC;IAED;;OAEG;IACH,IAAW,mBAAmB;QAC7B,OAAO,CAAC,CAAC;IACV,CAAC;IAED;;OAEG;IACH,IAAW,WAAW;QACrB,OAAO,SAAS,CAAC;IAClB,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;QACjB,OAAO,UAAU,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,eAAe,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QAClB,OAAO,OAAO,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;QACjB,OAAO,OAAO,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,UAAU,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QAChB,OAAO,EAAE,CAAC;IACX,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QACnB,OAAO,EAAE,CAAC;IACX,CAAC;IAED;;;;OAIG;IACH,IAAW,SAAS;QACnB,OAAO,gFAAgF,CAAC;IACzF,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACH,IAAW,WAAW;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QACnB,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;;OAIG;IACH,IAAW,UAAU;QACpB,OAAO,aAAa,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QACnB,OAAO,IAAI,uBAAa,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;QACjB,OAAO,IAAI,qBAAW,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACI,QAAQ;QACd,OAAO,oBAAoB,CAAC;IAC7B,CAAC;CACD;AA9KD,4BA8KC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "happy-dom",
3
- "version": "8.4.0",
3
+ "version": "8.4.2",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/capricorn86/happy-dom",
6
6
  "repository": "https://github.com/capricorn86/happy-dom",
@@ -34,25 +34,25 @@
34
34
  },
35
35
  "jest": {
36
36
  "transform": {
37
- "^.+\\.ts?$": "ts-jest"
37
+ "^.+\\.ts?$": [
38
+ "ts-jest",
39
+ {
40
+ "tsconfig": "./test/tsconfig.json"
41
+ }
42
+ ]
38
43
  },
39
44
  "testMatch": [
40
45
  "**/test/**/*.test.ts"
41
46
  ],
42
- "globals": {
43
- "ts-jest": {
44
- "tsconfig": "./test/tsconfig.json"
45
- }
46
- },
47
47
  "testEnvironment": "node"
48
48
  },
49
49
  "dependencies": {
50
+ "css.escape": "^1.5.1",
50
51
  "he": "^1.2.0",
51
52
  "node-fetch": "^2.x.x",
52
- "whatwg-encoding": "^2.0.0",
53
- "whatwg-mimetype": "^3.0.0",
54
53
  "webidl-conversions": "^7.0.0",
55
- "css.escape": "^1.5.1"
54
+ "whatwg-encoding": "^2.0.0",
55
+ "whatwg-mimetype": "^3.0.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/he": "^1.1.2",
@@ -63,16 +63,16 @@
63
63
  "@typescript-eslint/parser": "^5.16.0",
64
64
  "eslint": "^8.11.0",
65
65
  "eslint-config-prettier": "^8.5.0",
66
- "eslint-plugin-prettier": "^4.0.0",
67
66
  "eslint-plugin-filenames": "^1.3.2",
68
67
  "eslint-plugin-import": "^2.25.4",
69
68
  "eslint-plugin-jest": "^26.1.2",
70
69
  "eslint-plugin-jsdoc": "^38.0.6",
71
70
  "eslint-plugin-json": "^3.1.0",
71
+ "eslint-plugin-prettier": "^4.0.0",
72
72
  "eslint-plugin-turbo": "^0.0.7",
73
73
  "jest": "^29.4.0",
74
- "ts-jest": "^29.0.5",
75
74
  "prettier": "^2.6.0",
75
+ "ts-jest": "^29.0.5",
76
76
  "typescript": "^4.6.2"
77
77
  }
78
78
  }
@@ -10,77 +10,170 @@ import PluginArray from './PluginArray';
10
10
  * https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator.
11
11
  */
12
12
  export default class Navigator {
13
- // False if setting a cookie will be ignored and true otherwise.
14
- public readonly cookieEnabled: boolean = true;
13
+ /**
14
+ * False if setting a cookie will be ignored and true otherwise.
15
+ */
16
+ public get cookieEnabled(): boolean {
17
+ return true;
18
+ }
15
19
 
16
- // TODO: Not implemented.
17
- public readonly credentials: string = null;
20
+ /**
21
+ * TODO: Not implemented.
22
+ */
23
+ public get credentials(): string {
24
+ return null;
25
+ }
18
26
 
19
- // TODO: Not implemented.
20
- public readonly geolocation: string = null;
27
+ /**
28
+ * TODO: Not implemented.
29
+ */
30
+ public get geolocation(): string {
31
+ return null;
32
+ }
21
33
 
22
- // String representing the preferred language of the user, usually the language of the browser UI.
23
- public readonly language: string = 'en-US';
34
+ /**
35
+ * String representing the preferred language of the user, usually the language of the browser UI.
36
+ */
37
+ public get language(): string {
38
+ return 'en-US';
39
+ }
24
40
 
25
- // Array of string representing the user's preferred languages.
26
- public readonly languages: string[] = ['en-US', 'en'];
41
+ /**
42
+ * Array of string representing the user's preferred languages.
43
+ */
44
+ public get languages(): string[] {
45
+ return ['en-US', 'en'];
46
+ }
27
47
 
28
- // TODO: Not implemented.
29
- public readonly locks: string = null;
48
+ /**
49
+ * TODO: Not implemented.
50
+ */
51
+ public get locks(): string {
52
+ return null;
53
+ }
30
54
 
31
- // Maximum number of simultaneous touch contact points are supported by the current device.
32
- public readonly maxTouchPoints: number = 0;
55
+ /**
56
+ * Maximum number of simultaneous touch contact points are supported by the current device.
57
+ */
58
+ public get maxTouchPoints(): number {
59
+ return 0;
60
+ }
33
61
 
34
- // Number of logical processors available to run threads on the user's computer.
35
- public readonly hardwareConcurrency: number = 8;
62
+ /**
63
+ * Number of logical processors available to run threads on the user's computer.
64
+ */
65
+ public get hardwareConcurrency(): number {
66
+ return 8;
67
+ }
36
68
 
37
- // Browser app code name.
38
- public readonly appCodeName: string = 'Mozilla';
69
+ /**
70
+ * Browser app code name.
71
+ */
72
+ public get appCodeName(): string {
73
+ return 'Mozilla';
74
+ }
39
75
 
40
- // Browser app name.
41
- public readonly appName: string = 'Netscape';
76
+ /**
77
+ * Browser app name.
78
+ */
79
+ public get appName(): string {
80
+ return 'Netscape';
81
+ }
42
82
 
43
- // Browser app version.
44
- public readonly appVersion: string = '5.0 (Windows)';
83
+ /**
84
+ * Browser app version.
85
+ */
86
+ public get appVersion(): string {
87
+ return '5.0 (Windows)';
88
+ }
45
89
 
46
- // Browser platform.
47
- public readonly platform: string = 'Win32';
90
+ /**
91
+ * Browser platform.
92
+ */
93
+ public get platform(): string {
94
+ return 'Win32';
95
+ }
48
96
 
49
- // Browser product.
50
- public readonly product: string = 'Gecko';
97
+ /**
98
+ * Browser product.
99
+ */
100
+ public get product(): string {
101
+ return 'Gecko';
102
+ }
51
103
 
52
- // Browser product sub.
53
- public readonly productSub: string = '20100101';
104
+ /**
105
+ * Browser product sub.
106
+ */
107
+ public get productSub(): string {
108
+ return '20100101';
109
+ }
54
110
 
55
- // Browser vendor.
56
- public readonly vendor: string = '';
111
+ /**
112
+ * Browser vendor.
113
+ */
114
+ public get vendor(): string {
115
+ return '';
116
+ }
57
117
 
58
- // Browser vendor sub.
59
- public readonly vendorSub: string = '';
118
+ /**
119
+ * Browser vendor sub.
120
+ */
121
+ public get vendorSub(): string {
122
+ return '';
123
+ }
60
124
 
61
- // Browser user agent.
62
- // "appCodeName/appVersion number (Platform; Security; OS-or-CPU; Localization; rv: revision-version-number) product/productSub Application-Name Application-Name-version".
63
- public readonly userAgent: string =
64
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0';
125
+ /**
126
+ * Browser user agent.
127
+ *
128
+ * "appCodeName/appVersion number (Platform; Security; OS-or-CPU; Localization; rv: revision-version-number) product/productSub Application-Name Application-Name-version".
129
+ */
130
+ public get userAgent(): string {
131
+ return 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0';
132
+ }
65
133
 
66
- // Boolean value indicating whether the browser is working online.
67
- public readonly onLine: boolean = true;
134
+ /**
135
+ * Boolean value indicating whether the browser is working online.
136
+ */
137
+ public get onLine(): boolean {
138
+ return true;
139
+ }
68
140
 
69
- // TODO: Not implemented.
70
- public readonly permissions: string = null;
141
+ /**
142
+ * TODO: Not implemented.
143
+ */
144
+ public get permissions(): string {
145
+ return null;
146
+ }
71
147
 
72
- // Boolean Indicates whether the user agent is controlled by automation.
73
- public readonly webdriver: boolean = true;
148
+ /**
149
+ * Boolean Indicates whether the user agent is controlled by automation.
150
+ */
151
+ public get webdriver(): boolean {
152
+ return true;
153
+ }
74
154
 
75
- // The user's Do Not Track setting, which indicates whether the user is requesting web sites and advertisers to not track them.
76
- // The value of the property reflects that of the DNT HTTP header, i.e. Values of "1", "0", or "unspecified".
77
- public readonly doNotTrack: string = 'unspecified';
155
+ /**
156
+ * The user's Do Not Track setting, which indicates whether the user is requesting web sites and advertisers to not track them.
157
+ *
158
+ * The value of the property reflects that of the DNT HTTP header, i.e. Values of "1", "0", or "unspecified".
159
+ */
160
+ public get doNotTrack(): string {
161
+ return 'unspecified';
162
+ }
78
163
 
79
- // Browser mime-types.
80
- public readonly mimeTypes: MimeTypeArray = new MimeTypeArray([]);
164
+ /**
165
+ * Browser mime-types.
166
+ */
167
+ public get mimeTypes(): MimeTypeArray {
168
+ return new MimeTypeArray([]);
169
+ }
81
170
 
82
- // Browser plugins.
83
- public readonly plugins: PluginArray = new PluginArray([]);
171
+ /**
172
+ * Browser plugins.
173
+ */
174
+ public get plugins(): PluginArray {
175
+ return new PluginArray([]);
176
+ }
84
177
 
85
178
  /**
86
179
  * Returns the object as a string.