pipwerks / PDFObject

A lightweight JavaScript utility for dynamically embedding PDFs in HTML documents.
http://pdfobject.com/
Other
2.39k stars 986 forks source link

Fails to load in IE11 #287

Closed tomchiverton closed 1 year ago

tomchiverton commented 1 year ago

Logs a syntax error pointing at line 237, which is an arrow function, so doesn't work

        if(customAttribute && customAttribute.key && reservedTokens.every(token => !customAttribute.key.includes(token))){
tomchiverton commented 1 year ago

Introduced by https://github.com/pipwerks/PDFObject/commit/af739c1e434efe165af10cb5540a66afb952aef7

theodore-s-beers commented 1 year ago

Good catch. Can presumably replace…

reservedTokens.every(token => !customAttribute.key.includes(token))

with...

reservedTokens.every(function (token) {
  return !customAttribute.key.includes(token);
})
pipwerks commented 1 year ago

Internet Explorer 11 is officially kaput. Microsoft no longer supports it. Do you have clients that are still using IE11?

https://blogs.windows.com/windowsexperience/2022/06/15/internet-explorer-11-has-retired-and-is-officially-out-of-support-what-you-need-to-know/

pipwerks commented 1 year ago

(Not saying I can't implement a fix, but I've spent over 25 years kowtowing to IE. I'd like to bury it for good.)

tomchiverton commented 1 year ago

We have a product with around 30% users still using IE11 on some of the long term support versions of Windows where it is still supported

pipwerks commented 1 year ago

Fixed. The fat arrow wasn't the only issue, IE11 also choked on the includes() function. Thanks for reporting

pipwerks commented 9 months ago

@tomchiverton Just curious, what's the use rate now? Do you know when the LTS for Windows/IE will expire? Everything I've read says IE11 is completely unsupported.

tomchiverton commented 9 months ago

Windows 10 LTSC version is supported till 2027: https://learn.microsoft.com/en-us/lifecycle/products/windows-10-enterprise-ltsc-2021

We still see about 5%-10% IE11 usage, though this is dropping.