Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE11 Compatibility? #134

Open
davidh71 opened this issue Jul 12, 2020 · 3 comments
Open

IE11 Compatibility? #134

davidh71 opened this issue Jul 12, 2020 · 3 comments

Comments

@davidh71
Copy link

Hi,
Running in ie11 I get script errors because of the backticks in the regex.
Is this known issue?

Thanks

@RobTables
Copy link

RobTables commented Jul 23, 2020

I am new to this library and have not contributed but I feel like you may find it hard to get those who do contribute to work on support for IE

@mebjas
Copy link
Owner

mebjas commented Aug 9, 2020

Can you share the error message?

I do not have an IE11 setup with me but can try to resolve the issue, if you can help with validation.

@thatwill
Copy link

thatwill commented Oct 7, 2020

I also ran into this issue. (I wish I didn't have to support IE11, but it still ships with Windows 10!)

IE gives some errors for the csrfprotector.js file in the debugging console.
The initial error is:

SCRIPT1014: Invalid character
csrfprotector.js (47,26)

This refers to a line of code which contains a regex, presumably the same as @davidh71 found. IE stops execution of the JS at this point, so the token is not sent with POST requests.

Looking at that line, I found that the "template literals" are not supported in IE11, so anything like `Textstring${variable}moretext`, I had to change to 'Textstring'+variable+'moretext'.

After editing those, it got rid of the "invalid character" errors, but then got another error "Object doesn't support this action" relating to line 348.
IE11 also does not appear to support the Event constructor, so I had to use a CustomEvent polyfill from here, and assign it to Event.

After that, IE stopped giving errors, and it seems to work in IE and Firefox/Chrome (but haven't tested thoroughly yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants