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.
15 lines • 443 B
JavaScript
import { canUseDom } from './can-use-dom';
export var supportsPassive = false;
if (canUseDom) {
try {
var opts = {};
Object.defineProperty(opts, 'passive', {
// eslint-disable-next-line getter-return
get: function get() {
supportsPassive = true;
}
});
window.addEventListener('test-passive', null, opts);
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-empty
} catch (e) {}
}