Skip to content

es5 bundle not working on IE11 #210

@Clebiez

Description

@Clebiez

Hey @simonwep thanks for maintaining this package !

What is the current behavior?

For the 1.6.0 release, es5 bundle not working on old browser.
Using core-js w/ babel-preset-env not fix the problem.

Please provide the steps to reproduce and create a [JSFiddle]

Open https://jsfiddle.net/Simonwep/qx2Lod6r/ or https://simonwep.github.io/pickr/ with an old browser like IE11.
You will see in the console an error.

By the debugger it appears the following line is not understood by the browser :
SCRIPT10006: Expected )

On the line 2 of utils.js
function eventListener(method, elements, events, fn, options = {})

What is the expected behavior?

To fix this issue, I think we have to add the following babel plugin into the transpilation flow : babel-plugin-transform-parameters
To allow spread parameters and default value.

There’s also no way to polyfill it by using es6 bundle.

Your environment:

Version (see Pickr.version): 1.6.0
Used bundle (es5 or normal one): es5 (normal transpiled by babel seems to broke too)
Browser-version:  IE11 
Operating-system:  Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    browser quirkDeprecation, browser idiosyncrasies etc...

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions