UNPKG

react-grecaptcha-v3

Version:

Google Recaptcha V3 for React.js based application. Keep website performance high while prioritizing security.

20 lines 685 B
import globalOnLoad from "./global/globalOnLoad"; import { key, queueKey } from "./global/globals"; var subscribeEvent = function(callback) { var _window_grecaptcha; if (((_window_grecaptcha = window.grecaptcha) === null || _window_grecaptcha === void 0 ? void 0 : _window_grecaptcha.execute) !== void 0) { callback(); return; } window[key] = globalOnLoad; if (window[queueKey] === void 0) { window[queueKey] = [ callback ]; } else { window[queueKey].push(callback); } }; var subscribeEvent_default = subscribeEvent; export { subscribeEvent_default as default }; //# sourceMappingURL=subscribeEvent.js.map