Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fire-native-event

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fire-native-event

Fires browser native events

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

fire-native-event

CommonJS module that fires a browser native event.

Should be compatible with IE6+ and reasonable browsers.

It doesn't perform any validation on the provided event object.

It really just fires it, using either Element.prototype.dispatchEvent or Element.prototype.fireEvent.

// Create a native event somehow (this is out of this module's scope)
var createNativeEvent = require("create-event");
var eventType = "click";
var nativeEvent = createNativeEvent(eventType);

// Fire it on an element
var element = document.createElement("div");
var fire = require("fire-native-event");
fire(element, nativeEvent, eventType);

Keywords

FAQs

Package last updated on 22 Jan 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