-
Notifications
You must be signed in to change notification settings - Fork 6
/
focusin.min.js
1 lines (1 loc) · 1.42 KB
/
focusin.min.js
1
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){function polyfill(){var w=window;var d=w.document;if(w.onfocusin===undefined){d.addEventListener("focus",addPolyfill,true);d.addEventListener("blur",addPolyfill,true);d.addEventListener("focusin",removePolyfill,true);d.addEventListener("focusout",removePolyfill,true)}function addPolyfill(e){var type=e.type==="focus"?"focusin":"focusout";var event=new window.CustomEvent(type,{bubbles:true,cancelable:false});event.c1Generated=true;e.target.dispatchEvent(event)}function removePolyfill(e){if(!e.c1Generated){d.removeEventListener("focus",addPolyfill,true);d.removeEventListener("blur",addPolyfill,true);d.removeEventListener("focusin",removePolyfill,true);d.removeEventListener("focusout",removePolyfill,true)}setTimeout(function(){d.removeEventListener("focusin",removePolyfill,true);d.removeEventListener("focusout",removePolyfill,true)})}}module.exports={polyfill:polyfill}},{}],2:[function(require,module,exports){require("./focusin").polyfill()},{"./focusin":1}]},{},[2]);