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

Stop ie8 from breaking with prism-core #468

Closed
wants to merge 3 commits into from

Conversation

Pinpickle
Copy link

Can't say anything about plugins, but this stops IE8 from breaking (read some discussion at #9).
All I did was add a var statement to the declaration of self at the beginning of the file and IE stopped complaining. Nothing is broken, because that still makes it a global declaration.

Please ignore my typo about issue 8 in my commit message, git amend didn't work for some reason.

@Golmote
Copy link
Contributor

Golmote commented Jan 12, 2015

Does it still work when used in a Worker?

@Pinpickle
Copy link
Author

@Golmote I'm afraid I don't know and I'm not even sure how to test that. I'm fairly sure the new code means exactly the same thing, so this shouldn't change any functionality anywhere.

Happy to test with some instructions!

@Golmote
Copy link
Contributor

Golmote commented Jan 12, 2015

You should be able to test it by adding the data-manual attribute on the script and then calling highlightAll(true) yourself. The async parameter should run Prism in a Worker.

@Pinpickle
Copy link
Author

Tested it on Chrome, Firefox, Safari (Mac), and Chrome, IE11 (Windows). Everything looked to be working. An error was thrown about an undefined document (because workers don't have access to the DOM). I was getting these with or without the change in my tests so that's an issue for another day.

So yes, it works when used in a Worker.

@Joeynoh
Copy link

Joeynoh commented Jul 16, 2015

Came here to submit the same pull request. This issue keeps failing our IE tests on deploy, and now we cannot use a package manager to install Prism.

@Golmote Golmote closed this in 5f133c8 Jul 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants