jscrewit 2.34.0 → 2.35.0
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/api-doc/README.md +85 -11
- package/api-doc/interfaces/CustomFeature.md +2 -2
- package/api-doc/interfaces/ElementaryFeature.md +2 -2
- package/api-doc/interfaces/EncodeOptions.md +4 -4
- package/api-doc/interfaces/Feature.md +7 -8
- package/api-doc/interfaces/FeatureAll.md +57 -57
- package/api-doc/interfaces/FeatureConstructor.md +79 -80
- package/api-doc/interfaces/PredefinedFeature.md +2 -2
- package/api-doc/interfaces/default.md +0 -2
- package/api-doc/interfaces/encode.md +1 -1
- package/lib/encode.d.ts +14 -7
- package/lib/feature.d.ts +19 -15
- package/lib/jscrewit.d.ts +2 -2
- package/lib/jscrewit.js +240 -162
- package/lib/jscrewit.min.js +2 -2
- package/package.json +2 -2
|
@@ -10,19 +10,19 @@
|
|
|
10
10
|
|
|
11
11
|
### FeatureConstructor
|
|
12
12
|
|
|
13
|
-
▸ **FeatureConstructor**(
|
|
13
|
+
▸ **FeatureConstructor**(`...features`): [`CustomFeature`](CustomFeature.md)
|
|
14
14
|
|
|
15
15
|
Creates a new feature object from the union of the specified features.
|
|
16
16
|
|
|
17
17
|
The constructor can be used with or without the `new` operator, e.g.
|
|
18
18
|
`new JScrewIt.Feature(feature1, feature2)` or `JScrewIt.Feature(feature1, feature2)`.
|
|
19
19
|
If no arguments are specified, the new feature object will be equivalent to
|
|
20
|
-
|
|
20
|
+
[`DEFAULT`](FeatureConstructor.md#default).
|
|
21
21
|
|
|
22
|
-
**`
|
|
22
|
+
**`Example`**
|
|
23
23
|
|
|
24
24
|
The following statements are equivalent, and will all construct a new feature object
|
|
25
|
-
including both
|
|
25
|
+
including both [`ANY_DOCUMENT`](FeatureConstructor.md#any_document) and [`ANY_WINDOW`](FeatureConstructor.md#any_window).
|
|
26
26
|
|
|
27
27
|
```js
|
|
28
28
|
new JScrewIt.Feature("ANY_DOCUMENT", "ANY_WINDOW");
|
|
@@ -36,7 +36,7 @@ new JScrewIt.Feature(JScrewIt.Feature.ANY_DOCUMENT, JScrewIt.Feature.ANY_WINDOW)
|
|
|
36
36
|
new JScrewIt.Feature([JScrewIt.Feature.ANY_DOCUMENT, JScrewIt.Feature.ANY_WINDOW]);
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
**`
|
|
39
|
+
**`Throws`**
|
|
40
40
|
|
|
41
41
|
An error is thrown if any of the specified features are not mutually compatible.
|
|
42
42
|
|
|
@@ -165,19 +165,19 @@ An error is thrown if any of the specified features are not mutually compatible.
|
|
|
165
165
|
|
|
166
166
|
### constructor
|
|
167
167
|
|
|
168
|
-
• **new FeatureConstructor**(
|
|
168
|
+
• **new FeatureConstructor**(`...features`)
|
|
169
169
|
|
|
170
170
|
Creates a new feature object from the union of the specified features.
|
|
171
171
|
|
|
172
172
|
The constructor can be used with or without the `new` operator, e.g.
|
|
173
173
|
`new JScrewIt.Feature(feature1, feature2)` or `JScrewIt.Feature(feature1, feature2)`.
|
|
174
174
|
If no arguments are specified, the new feature object will be equivalent to
|
|
175
|
-
|
|
175
|
+
[`DEFAULT`](FeatureConstructor.md#default).
|
|
176
176
|
|
|
177
|
-
**`
|
|
177
|
+
**`Example`**
|
|
178
178
|
|
|
179
179
|
The following statements are equivalent, and will all construct a new feature object
|
|
180
|
-
including both
|
|
180
|
+
including both [`ANY_DOCUMENT`](FeatureConstructor.md#any_document) and [`ANY_WINDOW`](FeatureConstructor.md#any_window).
|
|
181
181
|
|
|
182
182
|
```js
|
|
183
183
|
JScrewIt.Feature("ANY_DOCUMENT", "ANY_WINDOW");
|
|
@@ -191,7 +191,7 @@ JScrewIt.Feature(JScrewIt.Feature.ANY_DOCUMENT, JScrewIt.Feature.ANY_WINDOW);
|
|
|
191
191
|
JScrewIt.Feature([JScrewIt.Feature.ANY_DOCUMENT, JScrewIt.Feature.ANY_WINDOW]);
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
**`
|
|
194
|
+
**`Throws`**
|
|
195
195
|
|
|
196
196
|
An error is thrown if any of the specified features are not mutually compatible.
|
|
197
197
|
|
|
@@ -213,7 +213,7 @@ FeatureAll.constructor
|
|
|
213
213
|
|
|
214
214
|
An immutable mapping of all predefined feature objects accessed by name or alias.
|
|
215
215
|
|
|
216
|
-
**`
|
|
216
|
+
**`Example`**
|
|
217
217
|
|
|
218
218
|
This will produce an array with the names and aliases of all predefined features.
|
|
219
219
|
|
|
@@ -271,7 +271,7 @@ ___
|
|
|
271
271
|
|
|
272
272
|
Existence of the global object document whose string representation starts with "\[object " and ends with "Document\]".
|
|
273
273
|
|
|
274
|
-
**`
|
|
274
|
+
**`Remarks`**
|
|
275
275
|
|
|
276
276
|
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser. This feature is not available inside web workers.
|
|
277
277
|
|
|
@@ -287,7 +287,7 @@ ___
|
|
|
287
287
|
|
|
288
288
|
Existence of the global object self whose string representation starts with "\[object " and ends with "Window\]".
|
|
289
289
|
|
|
290
|
-
**`
|
|
290
|
+
**`Remarks`**
|
|
291
291
|
|
|
292
292
|
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser. This feature is not available inside web workers.
|
|
293
293
|
|
|
@@ -303,7 +303,7 @@ ___
|
|
|
303
303
|
|
|
304
304
|
The property that the string representation of Array.prototype.entries\(\) starts with "\[object Array" and ends with "\]" at index 21 or 22.
|
|
305
305
|
|
|
306
|
-
**`
|
|
306
|
+
**`Remarks`**
|
|
307
307
|
|
|
308
308
|
Available in Chrome, Edge, Firefox, Safari 7.1+, Opera, and Node.js 0.12+.
|
|
309
309
|
|
|
@@ -319,7 +319,7 @@ ___
|
|
|
319
319
|
|
|
320
320
|
Support for arrow functions.
|
|
321
321
|
|
|
322
|
-
**`
|
|
322
|
+
**`Remarks`**
|
|
323
323
|
|
|
324
324
|
Available in Chrome, Edge, Firefox, Safari 10+, Opera, and Node.js 4+.
|
|
325
325
|
|
|
@@ -335,7 +335,7 @@ ___
|
|
|
335
335
|
|
|
336
336
|
Existence of the native function Array.prototype.at.
|
|
337
337
|
|
|
338
|
-
**`
|
|
338
|
+
**`Remarks`**
|
|
339
339
|
|
|
340
340
|
Available in Chrome, Edge, Firefox, Safari 15.4+, Opera, and Node.js 16.6+.
|
|
341
341
|
|
|
@@ -351,7 +351,7 @@ ___
|
|
|
351
351
|
|
|
352
352
|
Existence of the global functions atob and btoa.
|
|
353
353
|
|
|
354
|
-
**`
|
|
354
|
+
**`Remarks`**
|
|
355
355
|
|
|
356
356
|
Available in Chrome, Edge, Firefox, Internet Explorer 10+, Safari, Opera, Android Browser, and Node.js 16.0+. This feature is not available inside web workers in Safari before 10.
|
|
357
357
|
|
|
@@ -379,7 +379,7 @@ ___
|
|
|
379
379
|
|
|
380
380
|
Existence of the global object statusbar having the string representation "\[object BarProp\]".
|
|
381
381
|
|
|
382
|
-
**`
|
|
382
|
+
**`Remarks`**
|
|
383
383
|
|
|
384
384
|
Available in Chrome, Edge, Firefox, Safari, Opera, and Android Browser 4.4. This feature is not available inside web workers.
|
|
385
385
|
|
|
@@ -409,7 +409,7 @@ ___
|
|
|
409
409
|
|
|
410
410
|
The property that the various string methods returning HTML code such as String.prototype.big or String.prototype.link have both the tag name and attributes written in capital letters.
|
|
411
411
|
|
|
412
|
-
**`
|
|
412
|
+
**`Remarks`**
|
|
413
413
|
|
|
414
414
|
Available in Internet Explorer.
|
|
415
415
|
|
|
@@ -439,11 +439,11 @@ ___
|
|
|
439
439
|
|
|
440
440
|
Features available in Chrome 92, Edge 92 and Opera 78 or later.
|
|
441
441
|
|
|
442
|
-
**`
|
|
442
|
+
**`Remarks`**
|
|
443
443
|
|
|
444
444
|
This feature may be replaced or removed in the near future when current browser versions become obsolete. Use `CHROME` or `CHROME_PREV` instead of `CHROME_92` for long term support.
|
|
445
445
|
|
|
446
|
-
**`
|
|
446
|
+
**`See`**
|
|
447
447
|
|
|
448
448
|
[Engine Support Policy](https://github.com/fasttime/JScrewIt#engine-support-policy)
|
|
449
449
|
|
|
@@ -489,7 +489,7 @@ Existence of the global object console having the string representation "\[objec
|
|
|
489
489
|
|
|
490
490
|
This feature may become unavailable when certain browser extensions are active.
|
|
491
491
|
|
|
492
|
-
**`
|
|
492
|
+
**`Remarks`**
|
|
493
493
|
|
|
494
494
|
Available in Internet Explorer 10+, Safari before 14.1, and Android Browser. This feature is not available inside web workers in Safari before 7.1 and Android Browser 4.4.
|
|
495
495
|
|
|
@@ -517,7 +517,7 @@ ___
|
|
|
517
517
|
|
|
518
518
|
Existence of the global object document having the string representation "\[object Document\]".
|
|
519
519
|
|
|
520
|
-
**`
|
|
520
|
+
**`Remarks`**
|
|
521
521
|
|
|
522
522
|
Available in Internet Explorer before 11. This feature is not available inside web workers.
|
|
523
523
|
|
|
@@ -533,7 +533,7 @@ ___
|
|
|
533
533
|
|
|
534
534
|
Existence of the global object self having the string representation "\[object DOMWindow\]".
|
|
535
535
|
|
|
536
|
-
**`
|
|
536
|
+
**`Remarks`**
|
|
537
537
|
|
|
538
538
|
Available in Android Browser before 4.4. This feature is not available inside web workers.
|
|
539
539
|
|
|
@@ -557,7 +557,7 @@ ___
|
|
|
557
557
|
|
|
558
558
|
The property that double quotation mark, less than and greater than characters in the argument of String.prototype.fontcolor are escaped into their respective HTML entities.
|
|
559
559
|
|
|
560
|
-
**`
|
|
560
|
+
**`Remarks`**
|
|
561
561
|
|
|
562
562
|
Available in Android Browser and Node.js before 0.12.
|
|
563
563
|
|
|
@@ -573,7 +573,7 @@ ___
|
|
|
573
573
|
|
|
574
574
|
The property that double quotation marks in the argument of String.prototype.fontcolor are escaped as "\"".
|
|
575
575
|
|
|
576
|
-
**`
|
|
576
|
+
**`Remarks`**
|
|
577
577
|
|
|
578
578
|
Available in Chrome, Edge, Firefox, Safari, Opera, Android Browser, and Node.js.
|
|
579
579
|
|
|
@@ -589,7 +589,7 @@ ___
|
|
|
589
589
|
|
|
590
590
|
The property that only double quotation marks and no other characters in the argument of String.prototype.fontcolor are escaped into HTML entities.
|
|
591
591
|
|
|
592
|
-
**`
|
|
592
|
+
**`Remarks`**
|
|
593
593
|
|
|
594
594
|
Available in Chrome, Edge, Firefox, Safari, Opera, and Node.js 0.12+.
|
|
595
595
|
|
|
@@ -605,7 +605,7 @@ ___
|
|
|
605
605
|
|
|
606
606
|
Having regular expressions created with the RegExp constructor use escape sequences starting with a backslash to format line feed characters \("\\n"\) in their string representation.
|
|
607
607
|
|
|
608
|
-
**`
|
|
608
|
+
**`Remarks`**
|
|
609
609
|
|
|
610
610
|
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Node.js 12+.
|
|
611
611
|
|
|
@@ -621,7 +621,7 @@ ___
|
|
|
621
621
|
|
|
622
622
|
Having regular expressions created with the RegExp constructor use escape sequences starting with a backslash to format slashes \("/"\) in their string representation.
|
|
623
623
|
|
|
624
|
-
**`
|
|
624
|
+
**`Remarks`**
|
|
625
625
|
|
|
626
626
|
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Node.js 4+.
|
|
627
627
|
|
|
@@ -651,11 +651,11 @@ ___
|
|
|
651
651
|
|
|
652
652
|
Features available in Firefox 90 or later.
|
|
653
653
|
|
|
654
|
-
**`
|
|
654
|
+
**`Remarks`**
|
|
655
655
|
|
|
656
656
|
This feature may be replaced or removed in the near future when current browser versions become obsolete. Use `FF`, `FF_ESR`, or `FF_PREV` instead of `FF_90` for long term support.
|
|
657
657
|
|
|
658
|
-
**`
|
|
658
|
+
**`See`**
|
|
659
659
|
|
|
660
660
|
[Engine Support Policy](https://github.com/fasttime/JScrewIt#engine-support-policy)
|
|
661
661
|
|
|
@@ -701,7 +701,7 @@ A string representation of native functions typical for Firefox and Safari.
|
|
|
701
701
|
|
|
702
702
|
Remarkable traits are the lack of line feed characters at the beginning and at the end of the string and the presence of a line feed followed by four whitespaces \("\\n "\) before the "\[native code\]" sequence.
|
|
703
703
|
|
|
704
|
-
**`
|
|
704
|
+
**`Remarks`**
|
|
705
705
|
|
|
706
706
|
Available in Firefox and Safari.
|
|
707
707
|
|
|
@@ -717,7 +717,7 @@ ___
|
|
|
717
717
|
|
|
718
718
|
Existence of the native function Array.prototype.fill.
|
|
719
719
|
|
|
720
|
-
**`
|
|
720
|
+
**`Remarks`**
|
|
721
721
|
|
|
722
722
|
Available in Chrome, Edge, Firefox, Safari 7.1+, Opera, and Node.js 4+.
|
|
723
723
|
|
|
@@ -733,7 +733,7 @@ ___
|
|
|
733
733
|
|
|
734
734
|
Existence of the native function Array.prototype.flat.
|
|
735
735
|
|
|
736
|
-
**`
|
|
736
|
+
**`Remarks`**
|
|
737
737
|
|
|
738
738
|
Available in Chrome, Edge, Firefox, Safari 12+, Opera, and Node.js 11+.
|
|
739
739
|
|
|
@@ -749,7 +749,7 @@ ___
|
|
|
749
749
|
|
|
750
750
|
Existence of the function String.fromCodePoint.
|
|
751
751
|
|
|
752
|
-
**`
|
|
752
|
+
**`Remarks`**
|
|
753
753
|
|
|
754
754
|
Available in Chrome, Edge, Firefox, Safari 9+, Opera, and Node.js 4+.
|
|
755
755
|
|
|
@@ -765,7 +765,7 @@ ___
|
|
|
765
765
|
|
|
766
766
|
A string representation of dynamically generated functions where the character at index 19 is a line feed \("\\n"\).
|
|
767
767
|
|
|
768
|
-
**`
|
|
768
|
+
**`Remarks`**
|
|
769
769
|
|
|
770
770
|
Available in Chrome, Edge, Firefox, Opera, and Node.js 10+.
|
|
771
771
|
|
|
@@ -781,7 +781,7 @@ ___
|
|
|
781
781
|
|
|
782
782
|
A string representation of dynamically generated functions where the character at index 22 is a line feed \("\\n"\).
|
|
783
783
|
|
|
784
|
-
**`
|
|
784
|
+
**`Remarks`**
|
|
785
785
|
|
|
786
786
|
Available in Internet Explorer, Safari 9+, Android Browser, and Node.js before 10.
|
|
787
787
|
|
|
@@ -797,7 +797,7 @@ ___
|
|
|
797
797
|
|
|
798
798
|
Ability to call Array.prototype.toString with a non-array binding.
|
|
799
799
|
|
|
800
|
-
**`
|
|
800
|
+
**`Remarks`**
|
|
801
801
|
|
|
802
802
|
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, Android Browser 4.1+, and Node.js.
|
|
803
803
|
|
|
@@ -813,7 +813,7 @@ ___
|
|
|
813
813
|
|
|
814
814
|
Having the global function toString return the string "\[object Undefined\]" when invoked without a binding.
|
|
815
815
|
|
|
816
|
-
**`
|
|
816
|
+
**`Remarks`**
|
|
817
817
|
|
|
818
818
|
Available in Chrome, Edge, Firefox, Safari, Opera, and Node.js.
|
|
819
819
|
|
|
@@ -831,7 +831,7 @@ Presence of the text "GMT" after the first 25 characters in the string returned
|
|
|
831
831
|
|
|
832
832
|
The string representation of dates is implementation dependent, but most engines use a similar format, making this feature available in all supported engines except Internet Explorer 9 and 10.
|
|
833
833
|
|
|
834
|
-
**`
|
|
834
|
+
**`Remarks`**
|
|
835
835
|
|
|
836
836
|
Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari, Opera, Android Browser, and Node.js.
|
|
837
837
|
|
|
@@ -847,7 +847,7 @@ ___
|
|
|
847
847
|
|
|
848
848
|
Existence of the global object history having the string representation "\[object History\]".
|
|
849
849
|
|
|
850
|
-
**`
|
|
850
|
+
**`Remarks`**
|
|
851
851
|
|
|
852
852
|
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser. This feature is not available inside web workers.
|
|
853
853
|
|
|
@@ -863,7 +863,7 @@ ___
|
|
|
863
863
|
|
|
864
864
|
Existence of the global object Audio whose string representation starts with "function HTMLAudioElement".
|
|
865
865
|
|
|
866
|
-
**`
|
|
866
|
+
**`Remarks`**
|
|
867
867
|
|
|
868
868
|
Available in Android Browser 4.4. This feature is not available inside web workers.
|
|
869
869
|
|
|
@@ -879,7 +879,7 @@ ___
|
|
|
879
879
|
|
|
880
880
|
Existence of the global object document having the string representation "\[object HTMLDocument\]".
|
|
881
881
|
|
|
882
|
-
**`
|
|
882
|
+
**`Remarks`**
|
|
883
883
|
|
|
884
884
|
Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari, Opera, and Android Browser. This feature is not available inside web workers.
|
|
885
885
|
|
|
@@ -945,7 +945,7 @@ A string representation of native functions typical for Internet Explorer.
|
|
|
945
945
|
|
|
946
946
|
Remarkable traits are the presence of a line feed character \("\\n"\) at the beginning and at the end of the string and a line feed followed by four whitespaces \("\\n "\) before the "\[native code\]" sequence.
|
|
947
947
|
|
|
948
|
-
**`
|
|
948
|
+
**`Remarks`**
|
|
949
949
|
|
|
950
950
|
Available in Internet Explorer.
|
|
951
951
|
|
|
@@ -961,7 +961,7 @@ ___
|
|
|
961
961
|
|
|
962
962
|
The ability to use unary increment operators with string characters, like in \( ++"some string"\[0\] \): this will result in a TypeError in strict mode in ECMAScript compliant engines.
|
|
963
963
|
|
|
964
|
-
**`
|
|
964
|
+
**`Remarks`**
|
|
965
965
|
|
|
966
966
|
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, Android Browser, and Node.js. This feature is not available when strict mode is enforced in Chrome, Edge, Firefox, Internet Explorer 10+, Safari, Opera, and Node.js 5+.
|
|
967
967
|
|
|
@@ -977,7 +977,7 @@ ___
|
|
|
977
977
|
|
|
978
978
|
Existence of the global object Intl.
|
|
979
979
|
|
|
980
|
-
**`
|
|
980
|
+
**`Remarks`**
|
|
981
981
|
|
|
982
982
|
Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari 10+, Opera, Android Browser 4.4, and Node.js 0.12+.
|
|
983
983
|
|
|
@@ -993,7 +993,7 @@ ___
|
|
|
993
993
|
|
|
994
994
|
Language sensitive string representation of Infinity as "∞".
|
|
995
995
|
|
|
996
|
-
**`
|
|
996
|
+
**`Remarks`**
|
|
997
997
|
|
|
998
998
|
Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari 10+, Opera, Android Browser 4.4, and Node.js 0.12+.
|
|
999
999
|
|
|
@@ -1009,7 +1009,7 @@ ___
|
|
|
1009
1009
|
|
|
1010
1010
|
Features shared by all engines capable of localized number formatting, including output of Arabic digits, the Arabic decimal separator "٫", the letters in the first word of the Arabic string representation of NaN \("ليس"\), Persian digits and the Persian digit group separator "٬".
|
|
1011
1011
|
|
|
1012
|
-
**`
|
|
1012
|
+
**`Remarks`**
|
|
1013
1013
|
|
|
1014
1014
|
Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari 10+, Opera, Android Browser 4.4, and Node.js 13+.
|
|
1015
1015
|
|
|
@@ -1027,7 +1027,7 @@ Extended localized number formatting.
|
|
|
1027
1027
|
|
|
1028
1028
|
This includes all features of LOCALE_NUMERALS plus the output of the first three letters in the second word of the Arabic string representation of NaN \("رقم"\), Bengali digits, the letters in the Russian string representation of NaN \("не число"\) and the letters in the Persian string representation of NaN \("ناعدد"\).
|
|
1029
1029
|
|
|
1030
|
-
**`
|
|
1030
|
+
**`Remarks`**
|
|
1031
1031
|
|
|
1032
1032
|
Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari 10+, Opera, Android Browser 4.4, and Node.js 13+.
|
|
1033
1033
|
|
|
@@ -1043,7 +1043,7 @@ ___
|
|
|
1043
1043
|
|
|
1044
1044
|
Existence of the global object location with the property that Object.prototype.toString.call\(location\) evaluates to a string that starts with "\[object " and ends with "Location\]".
|
|
1045
1045
|
|
|
1046
|
-
**`
|
|
1046
|
+
**`Remarks`**
|
|
1047
1047
|
|
|
1048
1048
|
Available in Chrome, Edge, Firefox, Safari, Opera, and Android Browser.
|
|
1049
1049
|
|
|
@@ -1059,7 +1059,7 @@ ___
|
|
|
1059
1059
|
|
|
1060
1060
|
Existence of the name property for functions.
|
|
1061
1061
|
|
|
1062
|
-
**`
|
|
1062
|
+
**`Remarks`**
|
|
1063
1063
|
|
|
1064
1064
|
Available in Chrome, Edge, Firefox, Safari, Opera, Android Browser, and Node.js.
|
|
1065
1065
|
|
|
@@ -1075,7 +1075,7 @@ ___
|
|
|
1075
1075
|
|
|
1076
1076
|
Existence of the global object Node having the string representation "\[object NodeConstructor\]".
|
|
1077
1077
|
|
|
1078
|
-
**`
|
|
1078
|
+
**`Remarks`**
|
|
1079
1079
|
|
|
1080
1080
|
Available in Safari before 10. This feature is not available inside web workers.
|
|
1081
1081
|
|
|
@@ -1223,7 +1223,7 @@ ___
|
|
|
1223
1223
|
|
|
1224
1224
|
A string representation of native functions typical for V8 or for Internet Explorer but not for Firefox and Safari.
|
|
1225
1225
|
|
|
1226
|
-
**`
|
|
1226
|
+
**`Remarks`**
|
|
1227
1227
|
|
|
1228
1228
|
Available in Chrome, Edge, Internet Explorer, Opera, Android Browser, and Node.js.
|
|
1229
1229
|
|
|
@@ -1241,7 +1241,7 @@ A string representation of native functions typical for most engines with the no
|
|
|
1241
1241
|
|
|
1242
1242
|
A remarkable trait of this feature is the lack of line feed characters at the beginning and at the end of the string.
|
|
1243
1243
|
|
|
1244
|
-
**`
|
|
1244
|
+
**`Remarks`**
|
|
1245
1245
|
|
|
1246
1246
|
Available in Chrome, Edge, Firefox, Safari, Opera, Android Browser, and Node.js.
|
|
1247
1247
|
|
|
@@ -1257,7 +1257,7 @@ ___
|
|
|
1257
1257
|
|
|
1258
1258
|
The property that the string representation of Array.prototype.entries\(\) evaluates to "\[object Array Iterator\]" and that Array.prototype.entries\(\).constructor is the global function Object.
|
|
1259
1259
|
|
|
1260
|
-
**`
|
|
1260
|
+
**`Remarks`**
|
|
1261
1261
|
|
|
1262
1262
|
Available in Chrome, Edge, Firefox, Safari 9+, Opera, and Node.js 0.12+.
|
|
1263
1263
|
|
|
@@ -1275,7 +1275,7 @@ A string representation of native functions typical for Firefox, Internet Explor
|
|
|
1275
1275
|
|
|
1276
1276
|
A most remarkable trait of this feature is the presence of a line feed followed by four whitespaces \("\\n "\) before the "\[native code\]" sequence.
|
|
1277
1277
|
|
|
1278
|
-
**`
|
|
1278
|
+
**`Remarks`**
|
|
1279
1279
|
|
|
1280
1280
|
Available in Firefox, Internet Explorer, and Safari.
|
|
1281
1281
|
|
|
@@ -1291,7 +1291,7 @@ ___
|
|
|
1291
1291
|
|
|
1292
1292
|
Existence of the global function location.constructor whose string representation starts with "\[object L"
|
|
1293
1293
|
|
|
1294
|
-
**`
|
|
1294
|
+
**`Remarks`**
|
|
1295
1295
|
|
|
1296
1296
|
Available in Internet Explorer and Safari before 10. This feature is not available inside web workers.
|
|
1297
1297
|
|
|
@@ -1307,7 +1307,7 @@ ___
|
|
|
1307
1307
|
|
|
1308
1308
|
Having the function Object.prototype.toString return the string "\[object Undefined\]" when invoked without a binding.
|
|
1309
1309
|
|
|
1310
|
-
**`
|
|
1310
|
+
**`Remarks`**
|
|
1311
1311
|
|
|
1312
1312
|
Available in Chrome, Edge, Firefox, Internet Explorer 10+, Safari, Opera, Android Browser 4.1+, and Node.js.
|
|
1313
1313
|
|
|
@@ -1323,7 +1323,7 @@ ___
|
|
|
1323
1323
|
|
|
1324
1324
|
The property that the string representation of the global object constructor starts with "\[object W"
|
|
1325
1325
|
|
|
1326
|
-
**`
|
|
1326
|
+
**`Remarks`**
|
|
1327
1327
|
|
|
1328
1328
|
Available in Internet Explorer and Safari before 10. This feature is not available inside web workers in Safari before 10.
|
|
1329
1329
|
|
|
@@ -1339,7 +1339,7 @@ ___
|
|
|
1339
1339
|
|
|
1340
1340
|
Existence of the global object location.constructor whose string representation starts with "\[object " and ends with "LocationConstructor\]"
|
|
1341
1341
|
|
|
1342
|
-
**`
|
|
1342
|
+
**`Remarks`**
|
|
1343
1343
|
|
|
1344
1344
|
Available in Safari before 10.
|
|
1345
1345
|
|
|
@@ -1355,7 +1355,7 @@ ___
|
|
|
1355
1355
|
|
|
1356
1356
|
Existence of the global object Intl having the string representation "\[object Object\]"
|
|
1357
1357
|
|
|
1358
|
-
**`
|
|
1358
|
+
**`Remarks`**
|
|
1359
1359
|
|
|
1360
1360
|
Available in Internet Explorer 11, Safari 10+ before 14.0.1, Android Browser 4.4, and Node.js 0.12+ before 15.
|
|
1361
1361
|
|
|
@@ -1371,7 +1371,7 @@ ___
|
|
|
1371
1371
|
|
|
1372
1372
|
The property that the string representation of String.prototype.matchAll\(\) evaluates to "\[object RegExp String Iterator\]".
|
|
1373
1373
|
|
|
1374
|
-
**`
|
|
1374
|
+
**`Remarks`**
|
|
1375
1375
|
|
|
1376
1376
|
Available in Chrome, Edge, Firefox, Safari 13+, Opera, and Node.js 12+.
|
|
1377
1377
|
|
|
@@ -1521,7 +1521,7 @@ ___
|
|
|
1521
1521
|
|
|
1522
1522
|
Existence of the global object self whose string representation starts with "\[object ".
|
|
1523
1523
|
|
|
1524
|
-
**`
|
|
1524
|
+
**`Remarks`**
|
|
1525
1525
|
|
|
1526
1526
|
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser. This feature is not available inside web workers in Safari 7.1+ before 10.
|
|
1527
1527
|
|
|
@@ -1537,7 +1537,7 @@ ___
|
|
|
1537
1537
|
|
|
1538
1538
|
Support for the two-letter locale name "ar" to format decimal numbers as Arabic numerals.
|
|
1539
1539
|
|
|
1540
|
-
**`
|
|
1540
|
+
**`Remarks`**
|
|
1541
1541
|
|
|
1542
1542
|
Available in Firefox, Internet Explorer 11, Safari 10+, Android Browser 4.4, and Node.js 13+.
|
|
1543
1543
|
|
|
@@ -1553,7 +1553,7 @@ ___
|
|
|
1553
1553
|
|
|
1554
1554
|
Existence of the global string status.
|
|
1555
1555
|
|
|
1556
|
-
**`
|
|
1556
|
+
**`Remarks`**
|
|
1557
1557
|
|
|
1558
1558
|
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser. This feature is not available inside web workers.
|
|
1559
1559
|
|
|
@@ -1571,7 +1571,7 @@ The property that Object.prototype.toString.call\(\) evaluates to "\[object Unde
|
|
|
1571
1571
|
|
|
1572
1572
|
This behavior is specified by ECMAScript, and is enforced by all engines except Android Browser versions prior to 4.1.2, where this feature is not available.
|
|
1573
1573
|
|
|
1574
|
-
**`
|
|
1574
|
+
**`Remarks`**
|
|
1575
1575
|
|
|
1576
1576
|
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, Android Browser 4.1+, and Node.js.
|
|
1577
1577
|
|
|
@@ -1589,7 +1589,7 @@ A string representation of native functions typical for the V8 engine.
|
|
|
1589
1589
|
|
|
1590
1590
|
Remarkable traits are the lack of line feed characters at the beginning and at the end of the string and the presence of a single whitespace before the "\[native code\]" sequence.
|
|
1591
1591
|
|
|
1592
|
-
**`
|
|
1592
|
+
**`Remarks`**
|
|
1593
1593
|
|
|
1594
1594
|
Available in Chrome, Edge, Opera, Android Browser, and Node.js.
|
|
1595
1595
|
|
|
@@ -1605,7 +1605,7 @@ ___
|
|
|
1605
1605
|
|
|
1606
1606
|
Existence of the global object self having the string representation "\[object Window\]".
|
|
1607
1607
|
|
|
1608
|
-
**`
|
|
1608
|
+
**`Remarks`**
|
|
1609
1609
|
|
|
1610
1610
|
Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser 4.4. This feature is not available inside web workers.
|
|
1611
1611
|
|
|
@@ -1617,11 +1617,11 @@ Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Androi
|
|
|
1617
1617
|
|
|
1618
1618
|
### areCompatible
|
|
1619
1619
|
|
|
1620
|
-
▸ **areCompatible**(
|
|
1620
|
+
▸ **areCompatible**(`...features`): `boolean`
|
|
1621
1621
|
|
|
1622
1622
|
Determines whether the specified features are mutually compatible.
|
|
1623
1623
|
|
|
1624
|
-
**`
|
|
1624
|
+
**`Example`**
|
|
1625
1625
|
|
|
1626
1626
|
```js
|
|
1627
1627
|
// false: only one of "V8_SRC" or "IE_SRC" may be available.
|
|
@@ -1650,14 +1650,14 @@ ___
|
|
|
1650
1650
|
|
|
1651
1651
|
### areEqual
|
|
1652
1652
|
|
|
1653
|
-
▸ **areEqual**(
|
|
1653
|
+
▸ **areEqual**(`...features`): `boolean`
|
|
1654
1654
|
|
|
1655
1655
|
Determines whether all of the specified features are equivalent.
|
|
1656
1656
|
|
|
1657
1657
|
Different features are considered equivalent if they include the same set of elementary
|
|
1658
1658
|
features, regardless of any other difference.
|
|
1659
1659
|
|
|
1660
|
-
**`
|
|
1660
|
+
**`Example`**
|
|
1661
1661
|
|
|
1662
1662
|
```js
|
|
1663
1663
|
// false
|
|
@@ -1686,21 +1686,20 @@ ___
|
|
|
1686
1686
|
|
|
1687
1687
|
### commonOf
|
|
1688
1688
|
|
|
1689
|
-
▸ **commonOf**(
|
|
1689
|
+
▸ **commonOf**(`...features`): ``null`` \| [`CustomFeature`](CustomFeature.md)
|
|
1690
1690
|
|
|
1691
1691
|
Creates a new feature object equivalent to the intersection of the specified features.
|
|
1692
1692
|
|
|
1693
|
-
**`
|
|
1693
|
+
**`Example`**
|
|
1694
1694
|
|
|
1695
|
-
This will create a new feature object equivalent to
|
|
1695
|
+
This will create a new feature object equivalent to [`NAME`](FeatureConstructor.md#name).
|
|
1696
1696
|
|
|
1697
1697
|
```js
|
|
1698
1698
|
const newFeature = JScrewIt.Feature.commonOf(["ATOB", "NAME"], ["NAME", "SELF"]);
|
|
1699
1699
|
```
|
|
1700
1700
|
|
|
1701
|
-
This will create a new feature object equivalent to
|
|
1702
|
-
This is because both
|
|
1703
|
-
<code>[ANY_DOCUMENT](FeatureConstructor.md#any_document)</code>.
|
|
1701
|
+
This will create a new feature object equivalent to [`ANY_DOCUMENT`](FeatureConstructor.md#any_document).
|
|
1702
|
+
This is because both [`HTMLDOCUMENT`](FeatureConstructor.md#htmldocument) and [`DOCUMENT`](FeatureConstructor.md#document) imply [`ANY_DOCUMENT`](FeatureConstructor.md#any_document).
|
|
1704
1703
|
|
|
1705
1704
|
```js
|
|
1706
1705
|
const newFeature = JScrewIt.Feature.commonOf("HTMLDOCUMENT", "DOCUMENT");
|
|
@@ -1726,11 +1725,11 @@ ___
|
|
|
1726
1725
|
|
|
1727
1726
|
Returns a short description of a predefined feature in plain English.
|
|
1728
1727
|
|
|
1729
|
-
**`
|
|
1728
|
+
**`Remarks`**
|
|
1730
1729
|
|
|
1731
1730
|
Different names or aliases of the same feature may have different descriptions.
|
|
1732
1731
|
|
|
1733
|
-
**`
|
|
1732
|
+
**`Throws`**
|
|
1734
1733
|
|
|
1735
1734
|
An error is thrown if the specified argument is not a name or alias of a predefined feature.
|
|
1736
1735
|
|
|
@@ -73,7 +73,7 @@ Feature.name
|
|
|
73
73
|
|
|
74
74
|
### includes
|
|
75
75
|
|
|
76
|
-
▸ **includes**(
|
|
76
|
+
▸ **includes**(`...features`): `boolean`
|
|
77
77
|
|
|
78
78
|
Determines whether this feature object includes all of the specified features.
|
|
79
79
|
|
|
@@ -110,7 +110,7 @@ that require strict mode code, or inside web workers.
|
|
|
110
110
|
|
|
111
111
|
| Name | Type | Description |
|
|
112
112
|
| :------ | :------ | :------ |
|
|
113
|
-
| `environment` | ``"forced-strict-mode"`` \| ``"web-worker"`` | The environment to which this feature should be restricted. Two environments are currently supported.
|
|
113
|
+
| `environment` | ``"forced-strict-mode"`` \| ``"web-worker"`` | The environment to which this feature should be restricted. Two environments are currently supported. <dl> <dt><code>"forced-strict-mode"</code></dt> <dd> Removes features that are not available in environments that require strict mode code. </dd> <dt><code>"web-worker"</code></dt> <dd>Removes features that are not available inside web workers.</dd> </dl> |
|
|
114
114
|
| `engineFeatureObjs?` | readonly [`PredefinedFeature`](PredefinedFeature.md)[] | An array of predefined feature objects, each corresponding to a particular engine in which the restriction should be enacted. If this parameter is omitted, the restriction is enacted in all engines. |
|
|
115
115
|
|
|
116
116
|
#### Returns
|