Skip to content

Commit

Permalink
Simplified some feature checks
Browse files Browse the repository at this point in the history
  • Loading branch information
fasttime committed Aug 6, 2024
1 parent 4f7a214 commit c1a6eb9
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 69 deletions.
15 changes: 10 additions & 5 deletions Features.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ This table lists features available in the most common engines.
<li><a href="api-doc/interfaces/FeatureAll.md#NO_IE_SRC"><code>NO_IE_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#V8_SRC"><code>V8_SRC</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#NO_OLD_SAFARI_ARRAY_ITERATOR"><code>NO_OLD_SAFARI_ARRAY_ITERATOR</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_UNDEFINED"><code>OBJECT_UNDEFINED</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#GLOBAL_UNDEFINED"><code>GLOBAL_UNDEFINED</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_W_SELF"><code>OBJECT_W_SELF</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#REGEXP_STRING_ITERATOR"><code>REGEXP_STRING_ITERATOR</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#SELF_OBJ"><code>SELF_OBJ</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#ANY_WINDOW"><code>ANY_WINDOW</code></a> and <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#SELF_OBJ"><code>SELF_OBJ</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#ANY_WINDOW"><code>ANY_WINDOW</code></a>, <a href="api-doc/interfaces/FeatureAll.md#OBJECT_W_SELF"><code>OBJECT_W_SELF</code></a>, and <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#STATUS"><code>STATUS</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#UNDEFINED"><code>UNDEFINED</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#GLOBAL_UNDEFINED"><code>GLOBAL_UNDEFINED</code></a> and <a href="api-doc/interfaces/FeatureAll.md#OBJECT_UNDEFINED"><code>OBJECT_UNDEFINED</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#V8_SRC"><code>V8_SRC</code></a>
Expand Down Expand Up @@ -89,8 +90,9 @@ This table lists features available in the most common engines.
<li><a href="api-doc/interfaces/FeatureAll.md#NO_V8_SRC"><code>NO_V8_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#FF_SRC"><code>FF_SRC</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_ARRAY_ENTRIES_CTOR"><code>OBJECT_ARRAY_ENTRIES_CTOR</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_UNDEFINED"><code>OBJECT_UNDEFINED</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#GLOBAL_UNDEFINED"><code>GLOBAL_UNDEFINED</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_W_SELF"><code>OBJECT_W_SELF</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#REGEXP_STRING_ITERATOR"><code>REGEXP_STRING_ITERATOR</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#SELF_OBJ"><code>SELF_OBJ</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#ANY_WINDOW"><code>ANY_WINDOW</code></a> and <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#SELF_OBJ"><code>SELF_OBJ</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#ANY_WINDOW"><code>ANY_WINDOW</code></a>, <a href="api-doc/interfaces/FeatureAll.md#OBJECT_W_SELF"><code>OBJECT_W_SELF</code></a>, and <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#SHORT_LOCALES"><code>SHORT_LOCALES</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#STATUS"><code>STATUS</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#UNDEFINED"><code>UNDEFINED</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#GLOBAL_UNDEFINED"><code>GLOBAL_UNDEFINED</code></a> and <a href="api-doc/interfaces/FeatureAll.md#OBJECT_UNDEFINED"><code>OBJECT_UNDEFINED</code></a>)
Expand Down Expand Up @@ -125,8 +127,9 @@ This table lists features available in the most common engines.
<li><a href="api-doc/interfaces/FeatureAll.md#NO_V8_SRC"><code>NO_V8_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#IE_SRC"><code>IE_SRC</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_L_LOCATION_CTOR"><code>OBJECT_L_LOCATION_CTOR</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_UNDEFINED"><code>OBJECT_UNDEFINED</code></a> (Internet Explorer 10+)
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_W_SELF"><code>OBJECT_W_SELF</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#PLAIN_INTL"><code>PLAIN_INTL</code></a> (Internet Explorer 11)
<li><a href="api-doc/interfaces/FeatureAll.md#SELF_OBJ"><code>SELF_OBJ</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#ANY_WINDOW"><code>ANY_WINDOW</code></a> and <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#SELF_OBJ"><code>SELF_OBJ</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#ANY_WINDOW"><code>ANY_WINDOW</code></a>, <a href="api-doc/interfaces/FeatureAll.md#OBJECT_W_SELF"><code>OBJECT_W_SELF</code></a>, and <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#SHORT_LOCALES"><code>SHORT_LOCALES</code></a> (Internet Explorer 11)
<li><a href="api-doc/interfaces/FeatureAll.md#STATUS"><code>STATUS</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#UNDEFINED"><code>UNDEFINED</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#OBJECT_UNDEFINED"><code>OBJECT_UNDEFINED</code></a>)
Expand Down Expand Up @@ -176,10 +179,11 @@ This table lists features available in the most common engines.
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_ARRAY_ENTRIES_CTOR"><code>OBJECT_ARRAY_ENTRIES_CTOR</code></a> (Safari 9+)
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_L_LOCATION_CTOR"><code>OBJECT_L_LOCATION_CTOR</code></a> (not in Safari 10.0+)
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_UNDEFINED"><code>OBJECT_UNDEFINED</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#GLOBAL_UNDEFINED"><code>GLOBAL_UNDEFINED</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_W_SELF"><code>OBJECT_W_SELF</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#OLD_SAFARI_LOCATION_CTOR"><code>OLD_SAFARI_LOCATION_CTOR</code></a> (not in Safari 10.0+)
<li><a href="api-doc/interfaces/FeatureAll.md#PLAIN_INTL"><code>PLAIN_INTL</code></a> (Safari 10.0+, not in Safari 14.0.1+)
<li><a href="api-doc/interfaces/FeatureAll.md#REGEXP_STRING_ITERATOR"><code>REGEXP_STRING_ITERATOR</code></a> (Safari 13+)
<li><a href="api-doc/interfaces/FeatureAll.md#SELF_OBJ"><code>SELF_OBJ</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#ANY_WINDOW"><code>ANY_WINDOW</code></a> and <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#SELF_OBJ"><code>SELF_OBJ</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#ANY_WINDOW"><code>ANY_WINDOW</code></a>, <a href="api-doc/interfaces/FeatureAll.md#OBJECT_W_SELF"><code>OBJECT_W_SELF</code></a>, and <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#SHORT_LOCALES"><code>SHORT_LOCALES</code></a> (Safari 10.0+)
<li><a href="api-doc/interfaces/FeatureAll.md#STATUS"><code>STATUS</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#UNDEFINED"><code>UNDEFINED</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#GLOBAL_UNDEFINED"><code>GLOBAL_UNDEFINED</code></a> and <a href="api-doc/interfaces/FeatureAll.md#OBJECT_UNDEFINED"><code>OBJECT_UNDEFINED</code></a>)
Expand Down Expand Up @@ -215,8 +219,9 @@ This table lists features available in the most common engines.
<li><a href="api-doc/interfaces/FeatureAll.md#NO_FF_SRC"><code>NO_FF_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#V8_SRC"><code>V8_SRC</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#NO_IE_SRC"><code>NO_IE_SRC</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#HTMLAUDIOELEMENT"><code>HTMLAUDIOELEMENT</code></a> and <a href="api-doc/interfaces/FeatureAll.md#V8_SRC"><code>V8_SRC</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_UNDEFINED"><code>OBJECT_UNDEFINED</code></a> (Android Browser 4.1+)
<li><a href="api-doc/interfaces/FeatureAll.md#OBJECT_W_SELF"><code>OBJECT_W_SELF</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>; Android Browser 4.4)
<li><a href="api-doc/interfaces/FeatureAll.md#PLAIN_INTL"><code>PLAIN_INTL</code></a> (Android Browser 4.4)
<li><a href="api-doc/interfaces/FeatureAll.md#SELF_OBJ"><code>SELF_OBJ</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#ANY_WINDOW"><code>ANY_WINDOW</code></a>, <a href="api-doc/interfaces/FeatureAll.md#DOMWINDOW"><code>DOMWINDOW</code></a>, and <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#SELF_OBJ"><code>SELF_OBJ</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#ANY_WINDOW"><code>ANY_WINDOW</code></a>, <a href="api-doc/interfaces/FeatureAll.md#DOMWINDOW"><code>DOMWINDOW</code></a>, <a href="api-doc/interfaces/FeatureAll.md#OBJECT_W_SELF"><code>OBJECT_W_SELF</code></a>, and <a href="api-doc/interfaces/FeatureAll.md#WINDOW"><code>WINDOW</code></a>)
<li><a href="api-doc/interfaces/FeatureAll.md#SHORT_LOCALES"><code>SHORT_LOCALES</code></a> (Android Browser 4.4)
<li><a href="api-doc/interfaces/FeatureAll.md#STATUS"><code>STATUS</code></a>
<li><a href="api-doc/interfaces/FeatureAll.md#UNDEFINED"><code>UNDEFINED</code></a> (implied by <a href="api-doc/interfaces/FeatureAll.md#OBJECT_UNDEFINED"><code>OBJECT_UNDEFINED</code></a>; Android Browser 4.1+)
Expand Down
12 changes: 12 additions & 0 deletions api-doc/interfaces/FeatureAll.md
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,18 @@ Available in Chrome, Edge, Firefox, Internet Explorer 10+, Safari, Opera, Androi

***

### OBJECT\_W\_SELF

> **OBJECT\_W\_SELF**: [`ElementaryFeature`](ElementaryFeature.md)
The property that the string representation of the global object self starts with "\[object W".

#### Remarks

Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser 4.4. This feature is not available inside web workers in Chrome, Edge, Firefox, Safari, Opera, and Android Browser 4.4.

***

### OLD\_SAFARI\_LOCATION\_CTOR

> **OLD\_SAFARI\_LOCATION\_CTOR**: [`ElementaryFeature`](ElementaryFeature.md)
Expand Down
16 changes: 16 additions & 0 deletions api-doc/interfaces/FeatureConstructor.md
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,22 @@ Available in Chrome, Edge, Firefox, Internet Explorer 10+, Safari, Opera, Androi

***

### OBJECT\_W\_SELF

> **OBJECT\_W\_SELF**: [`ElementaryFeature`](ElementaryFeature.md)
The property that the string representation of the global object self starts with "\[object W".

#### Remarks

Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser 4.4. This feature is not available inside web workers in Chrome, Edge, Firefox, Safari, Opera, and Android Browser 4.4.

#### Inherited from

[`FeatureAll`](FeatureAll.md).[`OBJECT_W_SELF`](FeatureAll.md#object_w_self)

***

### OLD\_SAFARI\_LOCATION\_CTOR

> **OLD\_SAFARI\_LOCATION\_CTOR**: [`ElementaryFeature`](ElementaryFeature.md)
Expand Down
2 changes: 1 addition & 1 deletion api-doc/type-aliases/ElementaryFeatureName.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

# Type Alias: ElementaryFeatureName

> **ElementaryFeatureName**: `"ANY_DOCUMENT"` \| `"ANY_WINDOW"` \| `"ARRAY_ITERATOR"` \| `"ARROW"` \| `"ASYNC_FUNCTION"` \| `"AT"` \| `"ATOB"` \| `"BARPROP"` \| `"CAPITAL_HTML"` \| `"CONSOLE"` \| `"DOCUMENT"` \| `"DOMWINDOW"` \| `"ESC_HTML_ALL"` \| `"ESC_HTML_QUOT"` \| `"ESC_HTML_QUOT_ONLY"` \| `"ESC_REGEXP_LF"` \| `"ESC_REGEXP_SLASH"` \| `"FF_SRC"` \| `"FILL"` \| `"FLAT"` \| `"FROM_CODE_POINT"` \| `"FUNCTION_19_LF"` \| `"FUNCTION_22_LF"` \| `"GENERIC_ARRAY_TO_STRING"` \| `"GLOBAL_UNDEFINED"` \| `"GMT"` \| `"HISTORY"` \| `"HTMLAUDIOELEMENT"` \| `"IE_SRC"` \| `"INCR_CHAR"` \| `"INTL"` \| `"ITERATOR_HELPER"` \| `"JAPANESE_INFINITY"` \| `"LOCALE_INFINITY"` \| `"LOCALE_NUMERALS"` \| `"LOCALE_NUMERALS_EXT"` \| `"LOCATION"` \| `"NAME"` \| `"NODECONSTRUCTOR"` \| `"NO_FF_SRC"` \| `"NO_IE_SRC"` \| `"NO_OLD_SAFARI_ARRAY_ITERATOR"` \| `"NO_V8_SRC"` \| `"OBJECT_ARRAY_ENTRIES_CTOR"` \| `"OBJECT_L_LOCATION_CTOR"` \| `"OBJECT_UNDEFINED"` \| `"OLD_SAFARI_LOCATION_CTOR"` \| `"PLAIN_INTL"` \| `"REGEXP_STRING_ITERATOR"` \| `"SELF_OBJ"` \| `"SHORT_LOCALES"` \| `"STATUS"` \| `"UNDEFINED"` \| `"V8_SRC"` \| `"WINDOW"`
> **ElementaryFeatureName**: `"ANY_DOCUMENT"` \| `"ANY_WINDOW"` \| `"ARRAY_ITERATOR"` \| `"ARROW"` \| `"ASYNC_FUNCTION"` \| `"AT"` \| `"ATOB"` \| `"BARPROP"` \| `"CAPITAL_HTML"` \| `"CONSOLE"` \| `"DOCUMENT"` \| `"DOMWINDOW"` \| `"ESC_HTML_ALL"` \| `"ESC_HTML_QUOT"` \| `"ESC_HTML_QUOT_ONLY"` \| `"ESC_REGEXP_LF"` \| `"ESC_REGEXP_SLASH"` \| `"FF_SRC"` \| `"FILL"` \| `"FLAT"` \| `"FROM_CODE_POINT"` \| `"FUNCTION_19_LF"` \| `"FUNCTION_22_LF"` \| `"GENERIC_ARRAY_TO_STRING"` \| `"GLOBAL_UNDEFINED"` \| `"GMT"` \| `"HISTORY"` \| `"HTMLAUDIOELEMENT"` \| `"IE_SRC"` \| `"INCR_CHAR"` \| `"INTL"` \| `"ITERATOR_HELPER"` \| `"JAPANESE_INFINITY"` \| `"LOCALE_INFINITY"` \| `"LOCALE_NUMERALS"` \| `"LOCALE_NUMERALS_EXT"` \| `"LOCATION"` \| `"NAME"` \| `"NODECONSTRUCTOR"` \| `"NO_FF_SRC"` \| `"NO_IE_SRC"` \| `"NO_OLD_SAFARI_ARRAY_ITERATOR"` \| `"NO_V8_SRC"` \| `"OBJECT_ARRAY_ENTRIES_CTOR"` \| `"OBJECT_L_LOCATION_CTOR"` \| `"OBJECT_UNDEFINED"` \| `"OBJECT_W_SELF"` \| `"OLD_SAFARI_LOCATION_CTOR"` \| `"PLAIN_INTL"` \| `"REGEXP_STRING_ITERATOR"` \| `"SELF_OBJ"` \| `"SHORT_LOCALES"` \| `"STATUS"` \| `"UNDEFINED"` \| `"V8_SRC"` \| `"WINDOW"`

Name of an elementary feature.
89 changes: 26 additions & 63 deletions src/lib/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@ function checkLocaleNumeral(locale, number, regExp)
return returnValue;
}

function checkSelfFeature()
{
// self + '' throws an error inside a web worker in Safari 8 and 9.
try
{
var str = self + '';
}
catch (error)
{
return false;
}
var available = this(str);
return available;
}

function describeEngine(engine)
{
var description = 'Features available in ' + engine + '.';
Expand All @@ -53,6 +38,26 @@ function isExcludingAttribute(restrictionCache, restrictionName, featureObjs)
return returnValue;
}

function makeSelfFeatureCheck(regExp)
{
function check()
{
// self + '' throws an error inside a web worker in Safari 8 and 9.
try
{
var str = self + '';
}
catch (error)
{
return false;
}
var available = regExp.test(str);
return available;
}

return check;
}

function restrict(environment, engineFeatureObjs)
{
var restrictionCache = createEmpty();
Expand Down Expand Up @@ -104,15 +109,7 @@ var featureInfos =
description:
'Existence of the global object self whose string representation starts with "[object " ' +
'and ends with "Window]".',
check:
checkSelfFeature.bind
(
function (str)
{
var available = /^\[object [\S\s]*Window]$/.test(str);
return available;
}
),
check: makeSelfFeatureCheck(/^\[object [\S\s]*Window]$/),
includes: ['SELF_OBJ'],
attributes: { 'web-worker': 'web-worker-restriction' },
},
Expand Down Expand Up @@ -247,15 +244,7 @@ var featureInfos =
description:
'Existence of the global object self having the string representation "[object ' +
'DOMWindow]".',
check:
checkSelfFeature.bind
(
function (str)
{
var available = str === '[object DOMWindow]';
return available;
}
),
check: makeSelfFeatureCheck(/^\[object DOMWindow]$/),
includes: ['ANY_WINDOW'],
excludes: ['OBJECT_W_SELF'],
attributes: { 'web-worker': 'web-worker-restriction' },
Expand Down Expand Up @@ -510,7 +499,7 @@ var featureInfos =
check:
function ()
{
var available = Infinity.toLocaleString('ja').slice(-1) === '∞';
var available = /∞$/.test(Infinity.toLocaleString('ja'));
return available;
},
},
Expand All @@ -535,7 +524,6 @@ var featureInfos =
function ()
{
var available =
Number.prototype.toLocaleString &&
checkLocaleNumeral('ar', NaN, /^ليس/) &&
checkLocaleNumeral('ar-td', 234567890.1, /^٢٣٤٬?٥٦٧٬?٨٩٠٫١/) &&
checkLocaleNumeral('fa', 1234567890, /^۱٬۲۳۴٬۵۶۷٬۸۹۰/);
Expand All @@ -554,7 +542,6 @@ var featureInfos =
function ()
{
var available =
Number.prototype.toLocaleString &&
checkLocaleNumeral('ar', NaN, /^ليس.رقم/) &&
checkLocaleNumeral('ar-td', 234567890.1, /^٢٣٤٬?٥٦٧٬?٨٩٠٫١/) &&
checkLocaleNumeral('bn', 1234567890, /^১,২৩,৪৫,৬৭,৮৯০/) &&
Expand Down Expand Up @@ -706,15 +693,7 @@ var featureInfos =
description:
'The property that the string representation of the global object self starts ' +
'with "[object W".',
check:
checkSelfFeature.bind
(
function (str)
{
var available = /^\[object W/.test(str);
return available;
}
),
check: makeSelfFeatureCheck(/^\[object W/),
includes: ['SELF_OBJ'],
excludes: ['DOMWINDOW'],
attributes: { 'web-worker': 'non-ie-restriction' },
Expand Down Expand Up @@ -764,15 +743,7 @@ var featureInfos =
{
description:
'Existence of the global object self whose string representation starts with "[object ".',
check:
checkSelfFeature.bind
(
function (str)
{
var available = /^\[object /.test(str);
return available;
}
),
check: makeSelfFeatureCheck(/^\[object /),
attributes: { 'web-worker': 'safari-bug-21820506' },
},
SHORT_LOCALES:
Expand Down Expand Up @@ -830,15 +801,7 @@ var featureInfos =
{
description:
'Existence of the global object self having the string representation "[object Window]".',
check:
checkSelfFeature.bind
(
function (str)
{
var available = str === '[object Window]';
return available;
}
),
check: makeSelfFeatureCheck(/^\[object Window]$/),
includes: ['ANY_WINDOW', 'OBJECT_W_SELF'],
attributes: { 'web-worker': 'web-worker-restriction' },
},
Expand Down

0 comments on commit c1a6eb9

Please sign in to comment.