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.
14 lines • 373 B
JavaScript
import { canUseDom } from "./can-use-dom";
export let supportsPassive = false;
if (canUseDom) {
try {
const opts = {};
Object.defineProperty(opts, "passive", {
get() {
supportsPassive = true;
}
});
window.addEventListener("test-passive", null, opts);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {}
}