Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View timwburch's full-sized avatar

Tim Burch timwburch

View GitHub Profile
@timwburch
timwburch / event-listeners.js
Created April 19, 2017 23:49 — forked from danburzo/README.md
Get all event listeners on the page in Google Chrome
var items = Array.prototype.slice.call(
document.querySelectorAll('*')
).map(function(element) {
var listeners = getEventListeners(element);
return {
element: element,
listeners: Object.keys(listeners).map(function(k) {
return { event: k, listeners: listeners[k] };
})
};
@timwburch
timwburch / gist:cf43983b8a213ec972103bf93487083f
Created September 15, 2016 23:48 — forked from liamcurry/gist:2597326
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})