1/* 2 * This file is part of the TYPO3 CMS project. 3 * 4 * It is free software; you can redistribute it and/or modify it under 5 * the terms of the GNU General Public License, either version 2 6 * of the License, or any later version. 7 * 8 * For the full copyright and license information, please read the 9 * LICENSE.txt file that was distributed with this source code. 10 * 11 * The TYPO3 project - inspiring people to share! 12 */ 13class s{constructor(e,a,n=!1){this.eventName=e,this.callback=a,this.options=n}bindTo(e){if(!e){console.warn(`Binding event ${this.eventName} failed, element was not found.`);return}this.boundElement=e,e.addEventListener(this.eventName,this.callback,this.options)}delegateTo(e,a){if(!e){console.warn(`Delegating event ${this.eventName} failed, element was not found.`);return}this.boundElement=e,e.addEventListener(this.eventName,n=>{for(let t=n.target;t&&t!==this.boundElement;t=t.parentElement)if(t.matches(a)){this.callback.call(t,n,t);break}},this.options)}release(){this.boundElement.removeEventListener(this.eventName,this.callback)}}export{s as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.