t is not a constructor (using .min.js from jsdelivr 1.1.0)
ray73864 opened this issue · 1 comments
ray73864 commented
I'm attempting to use this on my webpage (it's an internal company one) but the Chrome devtools keep coming up about 't is not a constructor'.
All i'm doing is:
window['delegate-events'].on('click', '.btn-delete', function(e) { console.log(e); });
.btn-delete is a button on a dynamic table row, the error occurs when I load the page, if I then click on the button it does nothing.
ray73864 commented
It would appear, that to use this in the browser, one also needs to make sure they have the 'Selector-set' JS loaded before hand.
Once I did that, the library started working just fine.
I already had the CustomEvent polyfill loaded before this library, and from reading some previous issues on here I discovered I didn't need WeakMap since I only need to support >=IE11.