Currently DOM4_EVENTS_CONSTRUCTOR is enabled in Chromium only. We need to enable the flag in other ports. By enabling the flag, we can expose constructors for UIEvent, MouseEvent, KeyboardEvent, WheelEvent, TextEvent, CompositionEvent and FocusEvent. Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
This is also enabled under Safari (OS X).
<rdar://problem/28228198>
This was fixed in r140493. <https://trac.webkit.org/changeset/140493>