Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var a = {
- "div .a": [function (e) { e.preventDefault(); }, function () {}],
- "a": [function (e) {}]
- };
- for (var i in a) {
- Array.prototype.slice.call(document.querySelectorAll(i)).forEach(x => x.addEventListener(a[i]));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement