ironexdev / zoom

Lightweight (8 Kb) ES5 javascript plugin without any dependencies, compatible with desktop and mobile devices.
https://zoom.by-ironex.com
Apache License 2.0
33 stars 13 forks source link

JavaScript Default Parameters Doesn't Work on IE Version 11 #2

Closed jeremyrperry closed 5 years ago

jeremyrperry commented 5 years ago

Steps to Reproduce

Expected Results The element can pan and zoom like any other browser.

Actual Results The element can't pan or zoom. Upon investigation, it was discovered that IE 11 was throwing an error because the library makes use of default parameters, which the browser doesn't support. It is recommended to replace this with typechecking the parameter and assigning a default value if it doesn't match up.

screen shot 2019-01-22 at 11 06 53 am

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters#Browser_compatibility