Remove WebKit-based browser detection (#8773)

This commit is contained in:
Jon Koops
2023-01-01 18:23:01 +01:00
committed by GitHub
parent 0042d0b0dd
commit 097608274f

View File

@ -13,10 +13,6 @@
* ```
*/
// @property webkit: Boolean;
// `true` for webkit-based browsers like Chrome and Safari (including mobile versions).
const webkit = userAgentContains('webkit');
// @property chrome: Boolean; `true` for the Chrome browser.
const chrome = userAgentContains('chrome');
@ -26,9 +22,6 @@ const safari = !chrome && userAgentContains('safari');
// @property mobile: Boolean; `true` for all browsers running in a mobile device.
const mobile = typeof orientation !== 'undefined' || userAgentContains('mobile');
// @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device.
const mobileWebkit = mobile && webkit;
// @property pointer: Boolean
// `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).
const pointer = !!window.PointerEvent;
@ -61,11 +54,9 @@ function userAgentContains(str) {
export default {
webkit,
chrome,
safari,
mobile,
mobileWebkit,
pointer,
touch,
touchNative,