Use event constructor instead of createEvent()/initEvent()
+ accept window as target in dispatchAPIEvent() (not used for now)
+ don't check for "eventDetail === undefined", we don't use this for now
(#118)