-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBrowserFeatures.min.js
11 lines (11 loc) · 1.21 KB
/
BrowserFeatures.min.js
1
2
3
4
5
6
7
8
9
10
11
/**
*
* @Name : BrowserFeatures.js
* @Version : 1.0
* @Programmer : Max
* @Date : 2018-05-19
* @Released under : https://github.com/BaseMax/BrowserFeaturesJs/blob/master/LICENSE
* @Repository : https://github.com/BaseMax/BrowserFeaturesJs
*
**/
!function(e,n){"use strict";var t=function(t){return n.createElement(t)},a=function(t){try{return Function(t),!0}catch(t){return!1}},r=function(t){return!!e[t]},o={function_generator:a("function* g(){}"),function_async:a("async function f(){}"),function_generator_async:a("async function* fg(){}"),event_target:a("new EventTarget"),data_transfer_item:r("DataTransferItem"),data_transfer_item_list:r("DataTransferItemList"),broad_cast_channel:r("BroadcastChannel"),viewport:r("VisualViewport"),font:r("FontFace"),custom_element:r("customElements"),animate:r("Element.prototype.animate"),svg:!!n.createElementNS&&!!n.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,touch:!!("ontouchstart"in e||e.navigator&&e.navigator.msPointerEnabled&&e.MSGesture||e.DocumentTouch&&n instanceof DocumentTouch),webgl:function(t){try{return!(!e.WebGLRenderingContext||!t.getContext("webgl")&&!t.getContext("experimental-webgl"))}catch(t){return!1}}(t("canvas"))};e.browser=o}(window,document);