Skip to content

Not quite complete #2

@markdascher

Description

@markdascher

There are events that have no corresponding on… property, like DOMContentLoaded. This package doesn't pick those up. I still think this package is as good as it gets, but it might be worth a note somewhere.

An alternative source of information is browser source code. These lists still aren't 100% accurate, especially for Mozilla. But they include a bunch of extra events:

curl -LO https://github.com/WebKit/WebKit/raw/main/Source/WebCore/dom/EventNames.h
grep -o 'macro([^)]*' EventNames.h | cut -c7- | sort > webkit.txt

curl -LO https://github.com/chromium/chromium/raw/master/third_party/blink/renderer/core/events/event_type_names.json5
sed -En 's/^ *"([^"]*)",$/\1/p' event_type_names.json5 | sort > chromium.txt

curl -LO https://github.com/mozilla/gecko-dev/raw/master/dom/events/EventNameList.h
grep -v '^#' EventNameList.h | grep -o 'EVENT([^,]*' | cut -c7- | sort > gecko.txt

cat *.txt | sort | uniq > combined.txt

That currently gives a total of 457 events: combined.txt. It covers everything detected by this package, with one exception: mozorientationchange. (Of course, it also misses a bunch of IE-specific and Legacy Edge-specific stuff, since they're not open-source.)

For my purposes (basically a DIY monitorEvents) it's fine to just have a giant list of everything, without knowing what goes where, and without considering IE or Legacy Edge.

Again, this package is still perfect at what it does. It's the best way to double-check these sorts of lists, and I doubt there's any way to improve it. Just leaving this note here in case it's useful to anyone else!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions