Skip to content

Instantly share code, notes, and snippets.

View stevefaulkner's full-sized avatar

Steve Faulkner stevefaulkner

View GitHub Profile
@tkafka
tkafka / listAllEventListeners.js
Last active January 24, 2024 22:52 — forked from dmnsgn/listAllEventListeners.js
List all event listeners in a document
console.table((function listAllEventListeners() {
const allElements = Array.prototype.slice.call(document.querySelectorAll('*'));
allElements.push(document); // we also want document events
const types = [];
for (let ev in window) {
if (/^on/.test(ev)) types[types.length] = ev;
}
let elements = [];
for (let i = 0; i < allElements.length; i++) {

Before I watched this, if someone would have asked about why Pointer Events wasn't getting into Chrome, I'd have pointed at Safari. I don't love that reason, but it makes sense with their current dominance on mobile. However, I don't necessarily agree, I think if every other browser implemented them, they'd come around. That's tended to be true on the web for the last 20 years (Old IEs, webgl, innerHTML, video codecs when hardware is present, etc)

As far as the main issues brought up here, which I hopefully have fairly summarized (in one sentence each, lol, sry) below, I don't see them as entirely compelling for dropping PE altogether, especially since so many real-world folks (jQuery, Dojo, IE-y people) like the unification quite a bit.

  1. Hit tests (with or without capture) are expensive and bad for performance

From what I can read from the previous calls and conversations[0] about this, it's less of an issue than it seems. From those conversations, it seemed like hit tests weren't cached, and Chrome at

@darobin
darobin / q.md
Created September 18, 2014 08:56
Questions about After 5/WebSpecs

Questions