Edit File by line
/home/barbar84/public_h.../wp-inclu.../js
File: clipboard.js
/*!
[0] Fix | Delete
* clipboard.js v2.0.6
[1] Fix | Delete
* https://clipboardjs.com/
[2] Fix | Delete
*
[3] Fix | Delete
* Licensed MIT © Zeno Rocha
[4] Fix | Delete
*/
[5] Fix | Delete
(function webpackUniversalModuleDefinition(root, factory) {
[6] Fix | Delete
if(typeof exports === 'object' && typeof module === 'object')
[7] Fix | Delete
module.exports = factory();
[8] Fix | Delete
else if(typeof define === 'function' && define.amd)
[9] Fix | Delete
define([], factory);
[10] Fix | Delete
else if(typeof exports === 'object')
[11] Fix | Delete
exports["ClipboardJS"] = factory();
[12] Fix | Delete
else
[13] Fix | Delete
root["ClipboardJS"] = factory();
[14] Fix | Delete
})(this, function() {
[15] Fix | Delete
return /******/ (function(modules) { // webpackBootstrap
[16] Fix | Delete
/******/ // The module cache
[17] Fix | Delete
/******/ var installedModules = {};
[18] Fix | Delete
/******/
[19] Fix | Delete
/******/ // The require function
[20] Fix | Delete
/******/ function __webpack_require__(moduleId) {
[21] Fix | Delete
/******/
[22] Fix | Delete
/******/ // Check if module is in cache
[23] Fix | Delete
/******/ if(installedModules[moduleId]) {
[24] Fix | Delete
/******/ return installedModules[moduleId].exports;
[25] Fix | Delete
/******/ }
[26] Fix | Delete
/******/ // Create a new module (and put it into the cache)
[27] Fix | Delete
/******/ var module = installedModules[moduleId] = {
[28] Fix | Delete
/******/ i: moduleId,
[29] Fix | Delete
/******/ l: false,
[30] Fix | Delete
/******/ exports: {}
[31] Fix | Delete
/******/ };
[32] Fix | Delete
/******/
[33] Fix | Delete
/******/ // Execute the module function
[34] Fix | Delete
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
[35] Fix | Delete
/******/
[36] Fix | Delete
/******/ // Flag the module as loaded
[37] Fix | Delete
/******/ module.l = true;
[38] Fix | Delete
/******/
[39] Fix | Delete
/******/ // Return the exports of the module
[40] Fix | Delete
/******/ return module.exports;
[41] Fix | Delete
/******/ }
[42] Fix | Delete
/******/
[43] Fix | Delete
/******/
[44] Fix | Delete
/******/ // expose the modules object (__webpack_modules__)
[45] Fix | Delete
/******/ __webpack_require__.m = modules;
[46] Fix | Delete
/******/
[47] Fix | Delete
/******/ // expose the module cache
[48] Fix | Delete
/******/ __webpack_require__.c = installedModules;
[49] Fix | Delete
/******/
[50] Fix | Delete
/******/ // define getter function for harmony exports
[51] Fix | Delete
/******/ __webpack_require__.d = function(exports, name, getter) {
[52] Fix | Delete
/******/ if(!__webpack_require__.o(exports, name)) {
[53] Fix | Delete
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
[54] Fix | Delete
/******/ }
[55] Fix | Delete
/******/ };
[56] Fix | Delete
/******/
[57] Fix | Delete
/******/ // define __esModule on exports
[58] Fix | Delete
/******/ __webpack_require__.r = function(exports) {
[59] Fix | Delete
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
[60] Fix | Delete
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
[61] Fix | Delete
/******/ }
[62] Fix | Delete
/******/ Object.defineProperty(exports, '__esModule', { value: true });
[63] Fix | Delete
/******/ };
[64] Fix | Delete
/******/
[65] Fix | Delete
/******/ // create a fake namespace object
[66] Fix | Delete
/******/ // mode & 1: value is a module id, require it
[67] Fix | Delete
/******/ // mode & 2: merge all properties of value into the ns
[68] Fix | Delete
/******/ // mode & 4: return value when already ns object
[69] Fix | Delete
/******/ // mode & 8|1: behave like require
[70] Fix | Delete
/******/ __webpack_require__.t = function(value, mode) {
[71] Fix | Delete
/******/ if(mode & 1) value = __webpack_require__(value);
[72] Fix | Delete
/******/ if(mode & 8) return value;
[73] Fix | Delete
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
[74] Fix | Delete
/******/ var ns = Object.create(null);
[75] Fix | Delete
/******/ __webpack_require__.r(ns);
[76] Fix | Delete
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
[77] Fix | Delete
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
[78] Fix | Delete
/******/ return ns;
[79] Fix | Delete
/******/ };
[80] Fix | Delete
/******/
[81] Fix | Delete
/******/ // getDefaultExport function for compatibility with non-harmony modules
[82] Fix | Delete
/******/ __webpack_require__.n = function(module) {
[83] Fix | Delete
/******/ var getter = module && module.__esModule ?
[84] Fix | Delete
/******/ function getDefault() { return module['default']; } :
[85] Fix | Delete
/******/ function getModuleExports() { return module; };
[86] Fix | Delete
/******/ __webpack_require__.d(getter, 'a', getter);
[87] Fix | Delete
/******/ return getter;
[88] Fix | Delete
/******/ };
[89] Fix | Delete
/******/
[90] Fix | Delete
/******/ // Object.prototype.hasOwnProperty.call
[91] Fix | Delete
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
[92] Fix | Delete
/******/
[93] Fix | Delete
/******/ // __webpack_public_path__
[94] Fix | Delete
/******/ __webpack_require__.p = "";
[95] Fix | Delete
/******/
[96] Fix | Delete
/******/
[97] Fix | Delete
/******/ // Load entry module and return exports
[98] Fix | Delete
/******/ return __webpack_require__(__webpack_require__.s = 6);
[99] Fix | Delete
/******/ })
[100] Fix | Delete
/************************************************************************/
[101] Fix | Delete
/******/ ([
[102] Fix | Delete
/* 0 */
[103] Fix | Delete
/***/ (function(module, exports) {
[104] Fix | Delete
[105] Fix | Delete
function select(element) {
[106] Fix | Delete
var selectedText;
[107] Fix | Delete
[108] Fix | Delete
if (element.nodeName === 'SELECT') {
[109] Fix | Delete
element.focus();
[110] Fix | Delete
[111] Fix | Delete
selectedText = element.value;
[112] Fix | Delete
}
[113] Fix | Delete
else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
[114] Fix | Delete
var isReadOnly = element.hasAttribute('readonly');
[115] Fix | Delete
[116] Fix | Delete
if (!isReadOnly) {
[117] Fix | Delete
element.setAttribute('readonly', '');
[118] Fix | Delete
}
[119] Fix | Delete
[120] Fix | Delete
element.select();
[121] Fix | Delete
element.setSelectionRange(0, element.value.length);
[122] Fix | Delete
[123] Fix | Delete
if (!isReadOnly) {
[124] Fix | Delete
element.removeAttribute('readonly');
[125] Fix | Delete
}
[126] Fix | Delete
[127] Fix | Delete
selectedText = element.value;
[128] Fix | Delete
}
[129] Fix | Delete
else {
[130] Fix | Delete
if (element.hasAttribute('contenteditable')) {
[131] Fix | Delete
element.focus();
[132] Fix | Delete
}
[133] Fix | Delete
[134] Fix | Delete
var selection = window.getSelection();
[135] Fix | Delete
var range = document.createRange();
[136] Fix | Delete
[137] Fix | Delete
range.selectNodeContents(element);
[138] Fix | Delete
selection.removeAllRanges();
[139] Fix | Delete
selection.addRange(range);
[140] Fix | Delete
[141] Fix | Delete
selectedText = selection.toString();
[142] Fix | Delete
}
[143] Fix | Delete
[144] Fix | Delete
return selectedText;
[145] Fix | Delete
}
[146] Fix | Delete
[147] Fix | Delete
module.exports = select;
[148] Fix | Delete
[149] Fix | Delete
[150] Fix | Delete
/***/ }),
[151] Fix | Delete
/* 1 */
[152] Fix | Delete
/***/ (function(module, exports) {
[153] Fix | Delete
[154] Fix | Delete
function E () {
[155] Fix | Delete
// Keep this empty so it's easier to inherit from
[156] Fix | Delete
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
[157] Fix | Delete
}
[158] Fix | Delete
[159] Fix | Delete
E.prototype = {
[160] Fix | Delete
on: function (name, callback, ctx) {
[161] Fix | Delete
var e = this.e || (this.e = {});
[162] Fix | Delete
[163] Fix | Delete
(e[name] || (e[name] = [])).push({
[164] Fix | Delete
fn: callback,
[165] Fix | Delete
ctx: ctx
[166] Fix | Delete
});
[167] Fix | Delete
[168] Fix | Delete
return this;
[169] Fix | Delete
},
[170] Fix | Delete
[171] Fix | Delete
once: function (name, callback, ctx) {
[172] Fix | Delete
var self = this;
[173] Fix | Delete
function listener () {
[174] Fix | Delete
self.off(name, listener);
[175] Fix | Delete
callback.apply(ctx, arguments);
[176] Fix | Delete
};
[177] Fix | Delete
[178] Fix | Delete
listener._ = callback
[179] Fix | Delete
return this.on(name, listener, ctx);
[180] Fix | Delete
},
[181] Fix | Delete
[182] Fix | Delete
emit: function (name) {
[183] Fix | Delete
var data = [].slice.call(arguments, 1);
[184] Fix | Delete
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
[185] Fix | Delete
var i = 0;
[186] Fix | Delete
var len = evtArr.length;
[187] Fix | Delete
[188] Fix | Delete
for (i; i < len; i++) {
[189] Fix | Delete
evtArr[i].fn.apply(evtArr[i].ctx, data);
[190] Fix | Delete
}
[191] Fix | Delete
[192] Fix | Delete
return this;
[193] Fix | Delete
},
[194] Fix | Delete
[195] Fix | Delete
off: function (name, callback) {
[196] Fix | Delete
var e = this.e || (this.e = {});
[197] Fix | Delete
var evts = e[name];
[198] Fix | Delete
var liveEvents = [];
[199] Fix | Delete
[200] Fix | Delete
if (evts && callback) {
[201] Fix | Delete
for (var i = 0, len = evts.length; i < len; i++) {
[202] Fix | Delete
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
[203] Fix | Delete
liveEvents.push(evts[i]);
[204] Fix | Delete
}
[205] Fix | Delete
}
[206] Fix | Delete
[207] Fix | Delete
// Remove event from queue to prevent memory leak
[208] Fix | Delete
// Suggested by https://github.com/lazd
[209] Fix | Delete
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
[210] Fix | Delete
[211] Fix | Delete
(liveEvents.length)
[212] Fix | Delete
? e[name] = liveEvents
[213] Fix | Delete
: delete e[name];
[214] Fix | Delete
[215] Fix | Delete
return this;
[216] Fix | Delete
}
[217] Fix | Delete
};
[218] Fix | Delete
[219] Fix | Delete
module.exports = E;
[220] Fix | Delete
module.exports.TinyEmitter = E;
[221] Fix | Delete
[222] Fix | Delete
[223] Fix | Delete
/***/ }),
[224] Fix | Delete
/* 2 */
[225] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[226] Fix | Delete
[227] Fix | Delete
var is = __webpack_require__(3);
[228] Fix | Delete
var delegate = __webpack_require__(4);
[229] Fix | Delete
[230] Fix | Delete
/**
[231] Fix | Delete
* Validates all params and calls the right
[232] Fix | Delete
* listener function based on its target type.
[233] Fix | Delete
*
[234] Fix | Delete
* @param {String|HTMLElement|HTMLCollection|NodeList} target
[235] Fix | Delete
* @param {String} type
[236] Fix | Delete
* @param {Function} callback
[237] Fix | Delete
* @return {Object}
[238] Fix | Delete
*/
[239] Fix | Delete
function listen(target, type, callback) {
[240] Fix | Delete
if (!target && !type && !callback) {
[241] Fix | Delete
throw new Error('Missing required arguments');
[242] Fix | Delete
}
[243] Fix | Delete
[244] Fix | Delete
if (!is.string(type)) {
[245] Fix | Delete
throw new TypeError('Second argument must be a String');
[246] Fix | Delete
}
[247] Fix | Delete
[248] Fix | Delete
if (!is.fn(callback)) {
[249] Fix | Delete
throw new TypeError('Third argument must be a Function');
[250] Fix | Delete
}
[251] Fix | Delete
[252] Fix | Delete
if (is.node(target)) {
[253] Fix | Delete
return listenNode(target, type, callback);
[254] Fix | Delete
}
[255] Fix | Delete
else if (is.nodeList(target)) {
[256] Fix | Delete
return listenNodeList(target, type, callback);
[257] Fix | Delete
}
[258] Fix | Delete
else if (is.string(target)) {
[259] Fix | Delete
return listenSelector(target, type, callback);
[260] Fix | Delete
}
[261] Fix | Delete
else {
[262] Fix | Delete
throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');
[263] Fix | Delete
}
[264] Fix | Delete
}
[265] Fix | Delete
[266] Fix | Delete
/**
[267] Fix | Delete
* Adds an event listener to a HTML element
[268] Fix | Delete
* and returns a remove listener function.
[269] Fix | Delete
*
[270] Fix | Delete
* @param {HTMLElement} node
[271] Fix | Delete
* @param {String} type
[272] Fix | Delete
* @param {Function} callback
[273] Fix | Delete
* @return {Object}
[274] Fix | Delete
*/
[275] Fix | Delete
function listenNode(node, type, callback) {
[276] Fix | Delete
node.addEventListener(type, callback);
[277] Fix | Delete
[278] Fix | Delete
return {
[279] Fix | Delete
destroy: function() {
[280] Fix | Delete
node.removeEventListener(type, callback);
[281] Fix | Delete
}
[282] Fix | Delete
}
[283] Fix | Delete
}
[284] Fix | Delete
[285] Fix | Delete
/**
[286] Fix | Delete
* Add an event listener to a list of HTML elements
[287] Fix | Delete
* and returns a remove listener function.
[288] Fix | Delete
*
[289] Fix | Delete
* @param {NodeList|HTMLCollection} nodeList
[290] Fix | Delete
* @param {String} type
[291] Fix | Delete
* @param {Function} callback
[292] Fix | Delete
* @return {Object}
[293] Fix | Delete
*/
[294] Fix | Delete
function listenNodeList(nodeList, type, callback) {
[295] Fix | Delete
Array.prototype.forEach.call(nodeList, function(node) {
[296] Fix | Delete
node.addEventListener(type, callback);
[297] Fix | Delete
});
[298] Fix | Delete
[299] Fix | Delete
return {
[300] Fix | Delete
destroy: function() {
[301] Fix | Delete
Array.prototype.forEach.call(nodeList, function(node) {
[302] Fix | Delete
node.removeEventListener(type, callback);
[303] Fix | Delete
});
[304] Fix | Delete
}
[305] Fix | Delete
}
[306] Fix | Delete
}
[307] Fix | Delete
[308] Fix | Delete
/**
[309] Fix | Delete
* Add an event listener to a selector
[310] Fix | Delete
* and returns a remove listener function.
[311] Fix | Delete
*
[312] Fix | Delete
* @param {String} selector
[313] Fix | Delete
* @param {String} type
[314] Fix | Delete
* @param {Function} callback
[315] Fix | Delete
* @return {Object}
[316] Fix | Delete
*/
[317] Fix | Delete
function listenSelector(selector, type, callback) {
[318] Fix | Delete
return delegate(document.body, selector, type, callback);
[319] Fix | Delete
}
[320] Fix | Delete
[321] Fix | Delete
module.exports = listen;
[322] Fix | Delete
[323] Fix | Delete
[324] Fix | Delete
/***/ }),
[325] Fix | Delete
/* 3 */
[326] Fix | Delete
/***/ (function(module, exports) {
[327] Fix | Delete
[328] Fix | Delete
/**
[329] Fix | Delete
* Check if argument is a HTML element.
[330] Fix | Delete
*
[331] Fix | Delete
* @param {Object} value
[332] Fix | Delete
* @return {Boolean}
[333] Fix | Delete
*/
[334] Fix | Delete
exports.node = function(value) {
[335] Fix | Delete
return value !== undefined
[336] Fix | Delete
&& value instanceof HTMLElement
[337] Fix | Delete
&& value.nodeType === 1;
[338] Fix | Delete
};
[339] Fix | Delete
[340] Fix | Delete
/**
[341] Fix | Delete
* Check if argument is a list of HTML elements.
[342] Fix | Delete
*
[343] Fix | Delete
* @param {Object} value
[344] Fix | Delete
* @return {Boolean}
[345] Fix | Delete
*/
[346] Fix | Delete
exports.nodeList = function(value) {
[347] Fix | Delete
var type = Object.prototype.toString.call(value);
[348] Fix | Delete
[349] Fix | Delete
return value !== undefined
[350] Fix | Delete
&& (type === '[object NodeList]' || type === '[object HTMLCollection]')
[351] Fix | Delete
&& ('length' in value)
[352] Fix | Delete
&& (value.length === 0 || exports.node(value[0]));
[353] Fix | Delete
};
[354] Fix | Delete
[355] Fix | Delete
/**
[356] Fix | Delete
* Check if argument is a string.
[357] Fix | Delete
*
[358] Fix | Delete
* @param {Object} value
[359] Fix | Delete
* @return {Boolean}
[360] Fix | Delete
*/
[361] Fix | Delete
exports.string = function(value) {
[362] Fix | Delete
return typeof value === 'string'
[363] Fix | Delete
|| value instanceof String;
[364] Fix | Delete
};
[365] Fix | Delete
[366] Fix | Delete
/**
[367] Fix | Delete
* Check if argument is a function.
[368] Fix | Delete
*
[369] Fix | Delete
* @param {Object} value
[370] Fix | Delete
* @return {Boolean}
[371] Fix | Delete
*/
[372] Fix | Delete
exports.fn = function(value) {
[373] Fix | Delete
var type = Object.prototype.toString.call(value);
[374] Fix | Delete
[375] Fix | Delete
return type === '[object Function]';
[376] Fix | Delete
};
[377] Fix | Delete
[378] Fix | Delete
[379] Fix | Delete
/***/ }),
[380] Fix | Delete
/* 4 */
[381] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[382] Fix | Delete
[383] Fix | Delete
var closest = __webpack_require__(5);
[384] Fix | Delete
[385] Fix | Delete
/**
[386] Fix | Delete
* Delegates event to a selector.
[387] Fix | Delete
*
[388] Fix | Delete
* @param {Element} element
[389] Fix | Delete
* @param {String} selector
[390] Fix | Delete
* @param {String} type
[391] Fix | Delete
* @param {Function} callback
[392] Fix | Delete
* @param {Boolean} useCapture
[393] Fix | Delete
* @return {Object}
[394] Fix | Delete
*/
[395] Fix | Delete
function _delegate(element, selector, type, callback, useCapture) {
[396] Fix | Delete
var listenerFn = listener.apply(this, arguments);
[397] Fix | Delete
[398] Fix | Delete
element.addEventListener(type, listenerFn, useCapture);
[399] Fix | Delete
[400] Fix | Delete
return {
[401] Fix | Delete
destroy: function() {
[402] Fix | Delete
element.removeEventListener(type, listenerFn, useCapture);
[403] Fix | Delete
}
[404] Fix | Delete
}
[405] Fix | Delete
}
[406] Fix | Delete
[407] Fix | Delete
/**
[408] Fix | Delete
* Delegates event to a selector.
[409] Fix | Delete
*
[410] Fix | Delete
* @param {Element|String|Array} [elements]
[411] Fix | Delete
* @param {String} selector
[412] Fix | Delete
* @param {String} type
[413] Fix | Delete
* @param {Function} callback
[414] Fix | Delete
* @param {Boolean} useCapture
[415] Fix | Delete
* @return {Object}
[416] Fix | Delete
*/
[417] Fix | Delete
function delegate(elements, selector, type, callback, useCapture) {
[418] Fix | Delete
// Handle the regular Element usage
[419] Fix | Delete
if (typeof elements.addEventListener === 'function') {
[420] Fix | Delete
return _delegate.apply(null, arguments);
[421] Fix | Delete
}
[422] Fix | Delete
[423] Fix | Delete
// Handle Element-less usage, it defaults to global delegation
[424] Fix | Delete
if (typeof type === 'function') {
[425] Fix | Delete
// Use `document` as the first parameter, then apply arguments
[426] Fix | Delete
// This is a short way to .unshift `arguments` without running into deoptimizations
[427] Fix | Delete
return _delegate.bind(null, document).apply(null, arguments);
[428] Fix | Delete
}
[429] Fix | Delete
[430] Fix | Delete
// Handle Selector-based usage
[431] Fix | Delete
if (typeof elements === 'string') {
[432] Fix | Delete
elements = document.querySelectorAll(elements);
[433] Fix | Delete
}
[434] Fix | Delete
[435] Fix | Delete
// Handle Array-like based usage
[436] Fix | Delete
return Array.prototype.map.call(elements, function (element) {
[437] Fix | Delete
return _delegate(element, selector, type, callback, useCapture);
[438] Fix | Delete
});
[439] Fix | Delete
}
[440] Fix | Delete
[441] Fix | Delete
/**
[442] Fix | Delete
* Finds closest match and invokes callback.
[443] Fix | Delete
*
[444] Fix | Delete
* @param {Element} element
[445] Fix | Delete
* @param {String} selector
[446] Fix | Delete
* @param {String} type
[447] Fix | Delete
* @param {Function} callback
[448] Fix | Delete
* @return {Function}
[449] Fix | Delete
*/
[450] Fix | Delete
function listener(element, selector, type, callback) {
[451] Fix | Delete
return function(e) {
[452] Fix | Delete
e.delegateTarget = closest(e.target, selector);
[453] Fix | Delete
[454] Fix | Delete
if (e.delegateTarget) {
[455] Fix | Delete
callback.call(element, e);
[456] Fix | Delete
}
[457] Fix | Delete
}
[458] Fix | Delete
}
[459] Fix | Delete
[460] Fix | Delete
module.exports = delegate;
[461] Fix | Delete
[462] Fix | Delete
[463] Fix | Delete
/***/ }),
[464] Fix | Delete
/* 5 */
[465] Fix | Delete
/***/ (function(module, exports) {
[466] Fix | Delete
[467] Fix | Delete
var DOCUMENT_NODE_TYPE = 9;
[468] Fix | Delete
[469] Fix | Delete
/**
[470] Fix | Delete
* A polyfill for Element.matches()
[471] Fix | Delete
*/
[472] Fix | Delete
if (typeof Element !== 'undefined' && !Element.prototype.matches) {
[473] Fix | Delete
var proto = Element.prototype;
[474] Fix | Delete
[475] Fix | Delete
proto.matches = proto.matchesSelector ||
[476] Fix | Delete
proto.mozMatchesSelector ||
[477] Fix | Delete
proto.msMatchesSelector ||
[478] Fix | Delete
proto.oMatchesSelector ||
[479] Fix | Delete
proto.webkitMatchesSelector;
[480] Fix | Delete
}
[481] Fix | Delete
[482] Fix | Delete
/**
[483] Fix | Delete
* Finds the closest parent that matches a selector.
[484] Fix | Delete
*
[485] Fix | Delete
* @param {Element} element
[486] Fix | Delete
* @param {String} selector
[487] Fix | Delete
* @return {Function}
[488] Fix | Delete
*/
[489] Fix | Delete
function closest (element, selector) {
[490] Fix | Delete
while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
[491] Fix | Delete
if (typeof element.matches === 'function' &&
[492] Fix | Delete
element.matches(selector)) {
[493] Fix | Delete
return element;
[494] Fix | Delete
}
[495] Fix | Delete
element = element.parentNode;
[496] Fix | Delete
}
[497] Fix | Delete
}
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function