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

Defer File Highlight until the full DOM has loaded. #844

Merged
merged 1 commit into from
Dec 29, 2015

Conversation

chriswells0
Copy link
Contributor

This allows the File Highlight plugin to work properly even when the script is loaded before the elements that should have a file loaded into them.

zeitgeist87 added a commit that referenced this pull request Dec 29, 2015
Defer File Highlight until the full DOM has loaded.
@zeitgeist87 zeitgeist87 merged commit 9d6343a into PrismJS:gh-pages Dec 29, 2015
@zeitgeist87
Copy link
Collaborator

Thanks!

@chriswells0 chriswells0 deleted the file-highlight branch December 29, 2015 23:19
@LeaVerou
Copy link
Member

Thanks @chriswells0!
However, no browser we’re targeting doesn't support addEventListener. This is a pointless check that adds pointless extra code for everyone. Can we please remove it?

@zeitgeist87
Copy link
Collaborator

However, no browser we’re targeting doesn't support addEventListener. This is a pointless check that adds pointless extra code for everyone. Can we please remove it?

Good point. I've removed the check.

@chriswells0
Copy link
Contributor Author

no browser we’re targeting doesn't support addEventListener.

I thought that was the case, but I'm old school and struggle with telling browsers "no." ;) I'll get used to it one day.

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