create-event
Create an event object
Last updated 4 years ago by kenan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install create-event 
SYNC missed versions from official npm registry.

create-event

Create an event object.

Rewrite of ianstormtaylor/create-event to add npm+browserify support.

Example

var createEvent = require('create-event');

var event = createEvent('keydown', {
  ctrl: true,
  key: 'enter'
});

Installation

$ npm install create-event

API

var createEvent = require('create-event');

createEvent(type[, options])

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
}

Current Tags

  • 1.0.14                                ...           latest (4 years ago)

15 Versions

  • 1.0.14                                ...           4 years ago
  • 1.0.13                                ...           6 years ago
  • 1.0.12                                ...           6 years ago
  • 1.0.11                                ...           6 years ago
  • 1.0.10                                ...           7 years ago
  • 1.0.9                                ...           10 years ago
  • 1.0.8                                ...           11 years ago
  • 1.0.7                                ...           11 years ago
  • 1.0.6                                ...           11 years ago
  • 1.0.5                                ...           11 years ago
  • 1.0.4                                ...           11 years ago
  • 1.0.3                                ...           12 years ago
  • 1.0.2                                ...           12 years ago
  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |