Event.Mock 1.0

This little wrapper creates a Mock Event object to be used with fire event.



Details

Author
Arieh Glazer
Current version
1.0
GitHub
arieh/Event.Mock
Downloads
3547
Category
Utilities
Tags
Report
GitHub Issues

Releases


Dependencies

  • _self_/_current_: core/1.2.4 : [Event]

How to use

The simplest use case is this:

$('el').fireEvent('click',new Event.Mock);

If you want, you can set a target for the event:

var ev = new Event.Mock($('el-target'));
$('el').fireEvent('click',ev);

And lastly, you can specify an event type, though this will not be used on IE:

var ev = new Event.Mock($('el-target'),'mousedown');
$('el').fireEvent('click',ev);

Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus