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 = ;var eventType = "click";var nativeEvent = ;// Fire it on an elementvar element = document;var fire = ;;