dispatchEvent, avoid unnecessary apply and instanceof
Merge pull request #259 from drkibitz/dispatchEvent

dispatchEvent, avoid unnecessary apply and instanceof