Merge pull request #6 from tehsis/master

Moved from createEvent and initEvent to CustomEvent constructor
fix typo
Fix mixed tabs and spaces
fail gracefully when browser does not support createEvent (IE8)
Merge pull request #7 from sansb/master

Fail gracefully when browser does not support document.createEvent (as in IE8)
Moved the event detection. Supporting CustomEvent if createEvent is not present