New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

compat-trigger-event

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compat-trigger-event

Trigger native DOM events. This is primarily useful for testing, or for triggering common DOM events such as the change event for custom components.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
increased by2.8%
Maintainers
1
Weekly downloads
 
Created
Source

compat-trigger-event

npm travis

trigger-event forked to ensure compatibility with both Duo and Browserify.

Trigger native DOM events. This is primarily useful for testing, or for triggering common DOM events such as the change event for custom components.

Installation

npm install compat-trigger-event

API

trigger(el, name, options)

Triggers the name event on el. Options may be passed in to customize the event.

HTMLEvents support the following options:

bubbles
cancelable

MouseEvents support the following options:

bubbles
cancelable
detail (number of clicks)
screenX / screenY
clientX / clientY
ctrlKey
altKey
shiftKey
metaKey
button (mouse button)

Any other event will be triggered as a CustomEvent.

See the W3C Event Spec for more details.

Where sensible, sane defaults will be filled in. See the list of event types for supported events.

Attribution

This is loosely based on kangax's event.simulate.js.

Contributions from:

FAQs

Package last updated on 03 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc