UNPKG

pay-sdk-react

Version:

A cross-platform payment SDK for React, supporting Alipay, WeChat Pay, PayPal, Stripe, Payssion, and Airwallex, compatible with H5, PC, and App environments.

20 lines (19 loc) 543 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.supportsPassive = void 0; var _canUseDom = require("./can-use-dom"); let supportsPassive = exports.supportsPassive = false; if (_canUseDom.canUseDom) { try { const opts = {}; Object.defineProperty(opts, "passive", { get() { exports.supportsPassive = supportsPassive = true; } }); window.addEventListener("test-passive", null, opts); // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (e) {} }