GoogleChrome / dialog-polyfill

Polyfill for the HTML dialog element
BSD 3-Clause "New" or "Revised" License
2.45k stars 245 forks source link

Polyfill Demo not working in IE11 #224

Open JSMike opened 3 years ago

JSMike commented 3 years ago

image

SCRIPT1002: Syntax error
dialog-polyfill (159,58)

SCRIPT5007: Unable to get property 'toString' of undefined or null reference
dialog-polyfill (117,3)

This is referring to issues in the html file for the demo site, not the library.

https://github.com/GoogleChrome/dialog-polyfill/blob/5033aac1b74c44f36cde47be3d11f4756f3f8fda/index.html#L159 IE11 doesn't support arrow functions https://caniuse.com/?search=arrow%20function

https://github.com/GoogleChrome/dialog-polyfill/blob/5033aac1b74c44f36cde47be3d11f4756f3f8fda/index.html#L117 event.error is undefined

JSMike commented 3 years ago

error.message exists in ie11.

errorNode.textContent = event.error ? event.error.toString() : event.message;