GitXplorerGitXplorer
k

trigger-event

public
9 stars
0 forks
2 issues

Commits

List of commits on branch master.
Unverified
311639414a6bf7ff7ed22f573563f25a9ea7684d

chore(ci): update bahmutov/npm-install action to v1.10.5

kkenany committed 15 days ago
Unverified
49736c0d9e686643667ef3fe24a53c1e9c84aba1

chore(deps): tape@5.9.0

rrenovate[bot] committed a month ago
Unverified
6434ffe259b8ebbac3df3fe6870db9f598eb1814

chore(deps): eslint@8.57.1

rrenovate[bot] committed a month ago
Unverified
b8a2452b6b8c42d5f094af6c06de81639069afd3

chore(deps): conventional-changelog-conventionalcommits@8.0.0

rrenovate[bot] committed 2 months ago
Unverified
8f8055ace2acae3de04a1a4689ecaaa220a90615

chore(deps): semantic-release@24.2.0

rrenovate[bot] committed 2 months ago
Unverified
09b4dd92aa437c53851efcdcf9dc21431570e325

chore(deps): browserify@17.0.1

rrenovate[bot] committed 2 months ago

README

The README file for this repository.

trigger-event

Programmatically trigger a DOM event.

Rewrite of ianstormtaylor/trigger-event for npm+browserify support.

Example

var triggerEvent = require('trigger-event');

triggerEvent(document, 'keydown', {key: 'enter'});
triggerEvent('keydown', {key: 'enter'})

Installation

$ npm install trigger-event

API

var triggerEvent = require('trigger-event');

triggerEvent([element, ]type[, options])

Programmatically triggers a DOM event of type:

  • 'click'
  • 'dblclick'
  • 'keydown'
  • 'keyup'

document is used if element is not provided.

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
}