polyfill icon indicating copy to clipboard operation
polyfill copied to clipboard

Fix CustomEvent Implementation

Open WebReflection opened this issue 6 years ago • 7 comments

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.

WebReflection avatar Dec 04 '18 17:12 WebReflection

Please consider publishing this fix ASAP since it's conflicting with other polyfills.

You will have to wait for @inexorabletash's review.

Mouvedia avatar Dec 04 '18 17:12 Mouvedia

will that ever happen?

WebReflection avatar Dec 10 '18 13:12 WebReflection

Please add a test case, then I can merge.

inexorabletash avatar Dec 10 '18 16:12 inexorabletash

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.

WebReflection avatar Dec 11 '18 00:12 WebReflection

Common @WebReflection just add one line there if you don't want to create another test case.

Mouvedia avatar Dec 11 '18 01:12 Mouvedia

I'm not lazy, I'm on vacation without internet and my laptop not always with me.

WebReflection avatar Dec 11 '18 01:12 WebReflection

With the patch applied, this fails in IE11:

assert.ok(new CustomEvent('!').constructor === CustomEvent);

inexorabletash avatar Dec 11 '18 04:12 inexorabletash