Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Low level helper for creating DOM events
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
.npmignore
License
Makefile
Readme.md
component.json
index.js
package.json

Readme.md

dom-event

low level helper for creating DOM event objects. It abstracts away the goofiness of the DOM api and browser quirks.

API

var event = require('dom-event')

event()

Create a native DOM event

event('mousemove')
event('keydown', { key: 'a' })
event('user-login')

Available events

  • load
  • unload
  • abort
  • error
  • select
  • change
  • submit
  • reset
  • focus
  • blur
  • resize
  • scroll
  • input
  • click
  • dblclick
  • mousedown
  • mouseup
  • mouseover
  • mousemove
  • mouseout
  • contextmenu
  • keypress
  • keydown
  • keyup

Anything else is currently considered a custom event so doesn't get any special attributes or behaviour.

Contributing

There are many more "native" events which should be included. They haven't been added simply because I don't need them just yet. If you add something, e.g. mutation events, please submit a pull-request.

Something went wrong with that request. Please try again.