dispatch-event-by-name

1.0.4 • Public • Published

dispatch-event-by-name

compatible tool for dispatchEvent()

Install

npm install dispatch-event-by-name

Usage & Api

var dispatch_event_by_name = require("dispatch-event-by-name");

_ele('divResult3').innerHTML = '<span myattr=11>aaa</span>';

_ele('divResult3').firstChild.onclick = function () { done(false); };

//dispatchEventByName(el, eventName [, options] )
//options:{ bubbles, cancelable, composed, delay } | bubbles | delay
dispatch_event_by_name(_ele('divResult3').firstChild, "click", 500);	//number for delay

Readme

Keywords

Package Sidebar

Install

npm i dispatch-event-by-name

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

4.15 kB

Total Files

4

Last publish

Collaborators

  • adf0001