1class MangoPagesOnClickHelper { 2 constructor(dataAttributeName, onClicks) { 3 this.init(dataAttributeName, onClicks); 4 } 5 6 init(dataAttributeName, onClicks) { 7 for (let key in onClicks) { 8 let items = document.querySelectorAll(`[${dataAttributeName}="${key}"]`); 9 if (!items || !items.length) { 10 continue; 11 } 12 13 items.forEach(item => { 14 item.addEventListener('click', () => { 15 new Function(onClicks[key])() 16 }); 17 }); 18 } 19 } 20}
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.