Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 577 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 577 Bytes

happen wraps the createEvent DOM API to make real event mocking in-browser palatable.

var element = document.getElementById('map');

// click shortcut
happen.click(element);

// dblclick shortcut
happen.dblclick(element);

// custom options
happen.dblclick(element, { shift: true });

Shortcuts:

  • happen.click
  • happen.dblclick
  • happen.mousedown
  • happen.mouseup
  • happen.mousemove
  • happen.keydown
  • happen.keyup
  • happen.keypress

Use it with a testing framework, like Jasmine.

Licensed BSD.