customizr 2.0.4 → 3.0.1
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/.github/workflows/testing.yml +3 -3
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/build/modernizr-custom.js +7038 -6
- package/build/modernizr-exclude.js +108 -7
- package/build/modernizr-package.js +7038 -6
- package/build/modernizr-prefixed.js +2 -2
- package/build/modernizr-select.js +2 -2
- package/cache/options.json +5 -2
- package/package.json +7 -6
- package/test/css/vanilla.css +217 -214
- package/test/js/amd.js +4 -1
- package/test/js/vanilla.js +4 -1
- package/test/tests.js +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* modernizr v3.
|
|
3
|
-
* Build https://modernizr.com/download?-adownload-ambientlight-aping-apng-appearance-areaping-arrow-atobbtoa-audio-audioautoplay-audioloop-audiopreload-avif-backdropfilter-backgroundblendmode-backgroundcliptext-backgroundsize-batteryapi-bdi-beacon-bgpositionshorthand-bgpositionxy-bgrepeatspace_bgrepeatround-bgsizecover-blobconstructor-bloburls-blobworkers-borderimage-borderradius-boxdecorationbreak-boxshadow-boxsizing-canvas-canvasblending-canvastext-canvaswinding-capture-checked-classlist-clipboard-connectioneffectivetype-contains-contenteditable-contextmenu-cookies-cors-createelementattrs_createelement_attrs-cryptography-cssall-cssanimations-csscalc-csschunit-csscolumns-cssescape-cssexunit-cssfilters-cssgradients-cssgrid_cssgridlegacy-csshyphens_softhyphens_softhyphensfind-cssinvalid-cssmask-csspointerevents-csspositionsticky-csspseudoanimations-csspseudotransitions-cssreflections-cssremunit-cssresize-cssscrollbar-csstransforms-csstransforms3d-csstransformslevel2-csstransitions-cssvalid-cssvhunit-cssvmaxunit-cssvminunit-cssvwunit-cubicbezierrange-customelements-customevent-customproperties-customprotocolhandler-dart-datachannel-datalistelem-dataset-datauri-dataview-dataworkers-details-devicemotion_deviceorientation-directory-display_runin-displaytable-documentfragment-ellipsis-es5-es5array-es5date-es5function-es5object-es5string-es5syntax-es5undefined-es6array-es6class-es6collections-es6math-es6number-es6object-es6string-es6symbol-es7array-es8object-eventlistener-eventsource-exiforientation-fetch-fileinput-filereader-filesystem-flash-flexbox-flexboxlegacy-flexboxtweener-flexgap-flexwrap-focusvisible-focuswithin-fontdisplay-fontface-forcetouch-formattribute-formvalidation-framed-fullscreen-gamepads-generatedcontent-generators-geolocation-getrandomvalues-getusermedia-hairline-hashchange-hidden-hiddenscroll-history-hovermq-hsla-htmlimports-ie8compat-imgcrossorigin-indexeddb-indexeddb2-indexeddbblob-inlinesvg-input-inputformaction-inputformenctype-inputformmethod-inputformnovalidate-inputformtarget-inputsearchevent-inputtypes-intersectionobserver-intl-jpeg2000-jpegxr-json-lastchild-lazyloading-ligatures-localizednumber-localstorage-lowbandwidth-lowbattery-matchmedia-mathml-mediaqueries-mediarecorder-mediasource-messagechannel-microdata-multiplebgs-mutationobserver-nthchild-objectfit-olreversed-oninput-opacity-outputelem-overflowscrolling-pagevisibility-passiveeventlisteners-peerconnection-performance-picture-placeholder-pointerevents-pointerlock-pointermq-postmessage-prefetch-preserve3d-progressbar_meter-promises-proximity-proxy-publickeycredential-queryselector-quotamanagement-regions-requestanimationframe-requestautocomplete-resizeobserver-restdestructuringarray_restdestructuringobject-restparameters-rgba-ruby-sandbox-scriptasync-scriptdefer-scrollsnappoints-scrolltooptions-seamless-serviceworker-sessionstorage-shadowroot-shadowrootlegacy-shapes-sharedworkers-siblinggeneral-sizes-smil-speechrecognition-speechsynthesis-spreadarray-spreadobject-srcdoc-srcset-strictmode-stringtemplate-stylescoped-subpixelfont-supports-svg-svgasimg-svgclippaths-svgfilters-svgforeignobject-target-template-templatestrings-textalignlast-textareamaxlength-textdecoration-textencoder_textdecoder-textshadow-texttrackapi_track-time-todataurljpeg_todataurlpng_todataurlwebp-touchevents-transferables-typedarrays-unicode-unicoderange-unknownelements-urlparser-urlsearchparams-userdata-userselect-variablefonts-vibrate-video-videoautoplay-videocrossorigin-videoloop-videopreload-vml-webanimations-webaudio-webgl-webglextensions-webintents-webp-webpalpha-webpanimation-webplossless_webp_lossless-websockets-websocketsbinary-websqldatabase-webworkers-willchange-wrapflow-xdomainrequest-xhr2-xhrresponsetype-xhrresponsetypearraybuffer-xhrresponsetypeblob-xhrresponsetypedocument-xhrresponsetypejson-xhrresponsetypetext-addtest-printshiv-setclasses-testprop-dontmin
|
|
2
|
+
* modernizr v3.13.0
|
|
3
|
+
* Build https://modernizr.com/download?-adownload-ambientlight-aping-apng-appearance-areaping-arrow-aspectratio-atobbtoa-audio-audioautoplay-audioloop-audiopreload-avif-backdropfilter-backgroundblendmode-backgroundcliptext-backgroundsize-batteryapi-bdi-beacon-bgpositionshorthand-bgpositionxy-bgrepeatspace_bgrepeatround-bgsizecover-blobconstructor-bloburls-blobworkers-borderimage-borderradius-boxdecorationbreak-boxshadow-boxsizing-canvas-canvasblending-canvastext-canvaswinding-capture-checked-classlist-clipboard-connectioneffectivetype-contains-contenteditable-contextmenu-cookies-cors-createelementattrs_createelement_attrs-cryptography-cssall-cssanimations-csscalc-csschunit-csscolumns-cssescape-cssexunit-cssfilters-cssgradients-cssgrid_cssgridlegacy-csshyphens_softhyphens_softhyphensfind-cssinvalid-cssmask-csspointerevents-csspositionsticky-csspseudoanimations-csspseudotransitions-cssreflections-cssremunit-cssresize-cssscrollbar-csstransforms-csstransforms3d-csstransformslevel2-csstransitions-cssvalid-cssvhunit-cssvmaxunit-cssvminunit-cssvwunit-cubicbezierrange-customelements-customevent-customproperties-customprotocolhandler-dart-datachannel-datalistelem-dataset-datauri-dataview-dataworkers-details-devicemotion_deviceorientation-directory-display_runin-displaytable-documentfragment-ellipsis-es5-es5array-es5date-es5function-es5object-es5string-es5syntax-es5undefined-es6array-es6class-es6collections-es6math-es6number-es6object-es6string-es6symbol-es7array-es8object-eventlistener-eventsource-exiforientation-fetch-fileinput-filereader-filesystem-flash-flexbox-flexboxlegacy-flexboxtweener-flexgap-flexwrap-focusvisible-focuswithin-fontdisplay-fontface-forcetouch-formattribute-formvalidation-framed-fullscreen-gamepads-generatedcontent-generators-geolocation-getrandomvalues-getusermedia-hairline-hashchange-hidden-hiddenscroll-history-hovermq-hsla-htmlimports-ie8compat-imgcrossorigin-indexeddb-indexeddb2-indexeddbblob-inlinesvg-input-inputformaction-inputformenctype-inputformmethod-inputformnovalidate-inputformtarget-inputsearchevent-inputtypes-intersectionobserver-intl-jpeg2000-jpegxr-json-lastchild-lazyloading-ligatures-localizednumber-localstorage-lowbandwidth-lowbattery-matchmedia-mathml-mediaqueries-mediarecorder-mediasource-messagechannel-microdata-multiplebgs-mutationobserver-nthchild-objectfit-olreversed-oninput-opacity-outputelem-overflowscrolling-pagevisibility-passiveeventlisteners-peerconnection-performance-picture-placeholder-pointerevents-pointerlock-pointermq-postmessage-prefetch-preserve3d-progressbar_meter-promises-proximity-proxy-publickeycredential-pushmanager-queryselector-quotamanagement-regions-requestanimationframe-requestautocomplete-resizeobserver-restdestructuringarray_restdestructuringobject-restparameters-rgba-ruby-sandbox-scriptasync-scriptdefer-scrollsnappoints-scrolltooptions-seamless-serviceworker-sessionstorage-shadowroot-shadowrootlegacy-shapes-sharedworkers-siblinggeneral-sizes-smil-speechrecognition-speechsynthesis-spreadarray-spreadobject-srcdoc-srcset-strictmode-stringtemplate-stylescoped-subpixelfont-supports-svg-svgasimg-svgclippaths-svgfilters-svgforeignobject-target-template-templatestrings-textalignlast-textareamaxlength-textdecoration-textencoder_textdecoder-textshadow-texttrackapi_track-time-todataurljpeg_todataurlpng_todataurlwebp-touchevents-transferables-typedarrays-unicode-unicoderange-unknownelements-urlparser-urlsearchparams-userdata-userselect-variablefonts-vibrate-video-videoautoplay-videocrossorigin-videoloop-videopreload-vml-webanimations-webaudio-webgl-webglextensions-webintents-webp-webpalpha-webpanimation-webplossless_webp_lossless-websockets-websocketsbinary-websqldatabase-webworkers-willchange-workertypeoption-wrapflow-xdomainrequest-xhr2-xhrresponsetype-xhrresponsetypearraybuffer-xhrresponsetypeblob-xhrresponsetypedocument-xhrresponsetypejson-xhrresponsetypetext-addtest-printshiv-setclasses-testprop-dontmin
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c)
|
|
6
6
|
* Faruk Ates
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
* @access public
|
|
36
36
|
*/
|
|
37
37
|
var ModernizrProto = {
|
|
38
|
-
_version: '3.
|
|
38
|
+
_version: '3.13.0',
|
|
39
39
|
|
|
40
40
|
// Any settings that don't work as separate modules
|
|
41
41
|
// can go in here as configuration.
|
|
@@ -4665,6 +4665,42 @@ used to remove the default styles of an element, such as input and buttons.
|
|
|
4665
4665
|
|
|
4666
4666
|
Modernizr.addTest('appearance', testAllProps('appearance'));
|
|
4667
4667
|
|
|
4668
|
+
/*!
|
|
4669
|
+
{
|
|
4670
|
+
"name": "aspectratio css property",
|
|
4671
|
+
"property": "aspectratio",
|
|
4672
|
+
"tags": ["css aspectratio", "aspect-ratio"],
|
|
4673
|
+
"builderAliases": ["aspectratio"],
|
|
4674
|
+
"caniuse":"mdn-css_properties_aspect-ratio",
|
|
4675
|
+
"authors": ["Debadutta Panda"],
|
|
4676
|
+
"notes": [{
|
|
4677
|
+
"name": "MDN Docs",
|
|
4678
|
+
"href": "https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio"
|
|
4679
|
+
}]
|
|
4680
|
+
}
|
|
4681
|
+
!*/
|
|
4682
|
+
/* DOC
|
|
4683
|
+
Detect working status of all aspectratio css property
|
|
4684
|
+
https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio
|
|
4685
|
+
*/
|
|
4686
|
+
|
|
4687
|
+
Modernizr.addTest("aspectratio", function () {
|
|
4688
|
+
if (typeof CSS !== "object" && typeof CSS.supports === "function") {
|
|
4689
|
+
return CSS.supports('aspect-ratio', '1 / 1')
|
|
4690
|
+
} else {
|
|
4691
|
+
var element = createElement('p'),
|
|
4692
|
+
elStyle = element.style
|
|
4693
|
+
if ('aspectRatio' in elStyle) {
|
|
4694
|
+
elStyle.cssText = 'aspect-ratio:1 / 1'
|
|
4695
|
+
element.remove()
|
|
4696
|
+
return (elStyle['aspectRatio'] === '1 / 1');
|
|
4697
|
+
} else {
|
|
4698
|
+
element.remove();
|
|
4699
|
+
return false;
|
|
4700
|
+
}
|
|
4701
|
+
}
|
|
4702
|
+
});
|
|
4703
|
+
|
|
4668
4704
|
/*!
|
|
4669
4705
|
{
|
|
4670
4706
|
"name": "Backdrop Filter",
|
|
@@ -9278,7 +9314,7 @@ Detects support for determining signal bandwidth via `navigator.connection.effec
|
|
|
9278
9314
|
/* DOC
|
|
9279
9315
|
Tests for determining low-bandwidth via `navigator.connection`
|
|
9280
9316
|
|
|
9281
|
-
There are
|
|
9317
|
+
There are three iterations of the `navigator.connection` interface.
|
|
9282
9318
|
|
|
9283
9319
|
The first is present in Android 2.2+ and only in the Browser (not WebView)
|
|
9284
9320
|
|
|
@@ -9291,16 +9327,20 @@ The second is speced at https://dvcs.w3.org/hg/dap/raw-file/tip/network-api/Over
|
|
|
9291
9327
|
|
|
9292
9328
|
Unknown devices are assumed as fast
|
|
9293
9329
|
|
|
9330
|
+
The third is placed at https://wicg.github.io/netinfo/
|
|
9331
|
+
|
|
9332
|
+
- Support for the old type now only exists in Android 4 and below (https://caniuse.com/netinfo)
|
|
9333
|
+
|
|
9294
9334
|
For more rigorous network testing, consider boomerang.js: https://github.com/bluesmoon/boomerang/
|
|
9295
9335
|
*/
|
|
9296
9336
|
|
|
9297
9337
|
Modernizr.addTest('lowbandwidth', function() {
|
|
9298
|
-
//
|
|
9299
|
-
var connection = navigator.connection || {type: 0};
|
|
9338
|
+
// Polyfill the network info API to inculde both the old type and new effectiveType
|
|
9339
|
+
var connection = navigator.connection || {type: 0, effectiveType: 0};
|
|
9300
9340
|
|
|
9301
9341
|
return connection.type === 3 || // connection.CELL_2G
|
|
9302
9342
|
connection.type === 4 || // connection.CELL_3G
|
|
9303
|
-
/^[23]g$/.test(connection.
|
|
9343
|
+
/^[23]g$/.test(connection.effectiveType); // string value in new spec
|
|
9304
9344
|
});
|
|
9305
9345
|
|
|
9306
9346
|
/*!
|
|
@@ -10423,6 +10463,25 @@ Detects support for matchMedia.
|
|
|
10423
10463
|
|
|
10424
10464
|
Modernizr.addTest('matchmedia', !!prefixed('matchMedia', window));
|
|
10425
10465
|
|
|
10466
|
+
/*!
|
|
10467
|
+
{
|
|
10468
|
+
"name": "PushManager",
|
|
10469
|
+
"property": "pushmanager",
|
|
10470
|
+
"caniuse": "mdn-api_pushmanager",
|
|
10471
|
+
"authors": ["Dawid Kulpa (@dawidkulpa)"],
|
|
10472
|
+
"notes": [{
|
|
10473
|
+
"name": "MDN Docs",
|
|
10474
|
+
"href": "https://developer.mozilla.org/en-US/docs/Web/API/PushManager"
|
|
10475
|
+
}]
|
|
10476
|
+
}
|
|
10477
|
+
!*/
|
|
10478
|
+
|
|
10479
|
+
/* DOC
|
|
10480
|
+
Detects support for PushManager.
|
|
10481
|
+
*/
|
|
10482
|
+
|
|
10483
|
+
Modernizr.addTest('pushmanager', 'PushManager' in window);
|
|
10484
|
+
|
|
10426
10485
|
/*!
|
|
10427
10486
|
{
|
|
10428
10487
|
"name": "ResizeObserver",
|
|
@@ -10699,6 +10758,48 @@ Detects whether web workers can use `transferables` objects.
|
|
|
10699
10758
|
}
|
|
10700
10759
|
});
|
|
10701
10760
|
|
|
10761
|
+
/*!
|
|
10762
|
+
{
|
|
10763
|
+
"name": "worker type option test",
|
|
10764
|
+
"property": "workertypeoption",
|
|
10765
|
+
"caniuse":"mdn-api_worker_worker_ecmascript_modules",
|
|
10766
|
+
"tags": ["web worker type options", "web worker"],
|
|
10767
|
+
"builderAliases": ["worker_type_options"],
|
|
10768
|
+
"authors": ["Debadutta Panda"],
|
|
10769
|
+
"notes": [{
|
|
10770
|
+
"name": "MDN Docs",
|
|
10771
|
+
"href": "https://developer.mozilla.org/en-US/docs/Web/API/Worker/Worker"
|
|
10772
|
+
}]
|
|
10773
|
+
}
|
|
10774
|
+
!*/
|
|
10775
|
+
/* DOC
|
|
10776
|
+
Detect working status of all Workeroptions
|
|
10777
|
+
https://developer.mozilla.org/en-US/docs/Web/API/Worker/Worker
|
|
10778
|
+
*/
|
|
10779
|
+
|
|
10780
|
+
Modernizr.addTest("workertypeoption", function () {
|
|
10781
|
+
if ('Worker' in window) {
|
|
10782
|
+
var isTypeOptionSupported = false,
|
|
10783
|
+
textTypeOption = {
|
|
10784
|
+
get type() {
|
|
10785
|
+
isTypeOptionSupported = true;
|
|
10786
|
+
return "module"
|
|
10787
|
+
}
|
|
10788
|
+
},
|
|
10789
|
+
scriptText = `var message='hello'`,
|
|
10790
|
+
blob = new Blob([scriptText], { type: 'text/javascript' }),
|
|
10791
|
+
url = URL.createObjectURL(blob)
|
|
10792
|
+
try {
|
|
10793
|
+
new Worker(url, textTypeOption).terminate();
|
|
10794
|
+
return isTypeOptionSupported;
|
|
10795
|
+
} catch (err) {
|
|
10796
|
+
return false;
|
|
10797
|
+
}
|
|
10798
|
+
} else {
|
|
10799
|
+
return false;
|
|
10800
|
+
}
|
|
10801
|
+
});
|
|
10802
|
+
|
|
10702
10803
|
|
|
10703
10804
|
// Run each test
|
|
10704
10805
|
testRunner();
|