Create an event
object.
Rewrite of ianstormtaylor/create-event to add npm+browserify support.
var createEvent = require('create-event');
var event = createEvent('keydown', {
ctrl: true,
key: 'enter'
});
$ npm install create-event
var createEvent = require('create-event');
Creates an event
object, where type
is one of the following possible
Strings:
'click'
'dblclick'
'keydown'
'keyup'
Default options
:
{
alt: false,
bubbles: true,
button: 0,
cancelable: true,
clientX: 0,
clientY: 0,
ctrl: false,
detail: 1,
key: 0,
meta: false,
relatedTarget: null,
screenX: 0,
screenY: 0,
shift: false,
view: window
}