polyfill
polyfill copied to clipboard
Fix CustomEvent Implementation
Currently new CustomEvent('!').constructor === CustomEvent
returns false
in IE11, which is a hell of a bummer for anything else that is either polyfilling or feature detecting CustomEvent after this file is on the page.
Bonus: I have removed the redundant in
check when typeof
is all it's needed.
Please consider publishing this fix ASAP since it's conflicting with other polyfills.
Thank you.
Please consider publishing this fix ASAP since it's conflicting with other polyfills.
You will have to wait for @inexorabletash's review.
will that ever happen?
Please add a test case, then I can merge.
The test case is in the ticket:
Currently
new CustomEvent('!').constructor === CustomEvent
returns false in IE11
I'm on vacation 'till 26th so I won't change this PR before that day.
Common @WebReflection just add one line there if you don't want to create another test case.
I'm not lazy, I'm on vacation without internet and my laptop not always with me.
With the patch applied, this fails in IE11:
assert.ok(new CustomEvent('!').constructor === CustomEvent);