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

(parser) new highlightAll() API #2962

Merged
merged 9 commits into from Jan 19, 2021

Conversation

joshgoebel
Copy link
Member

@joshgoebel joshgoebel commented Jan 14, 2021

Progress towards #2277.

Changes

Added new highlightAll() API which deprecates:

  • initHighlighting()
  • initHighlightingOnLoad()

These are slated to be removed with version 12. (with v11 they will likely just because aliases to highlightAll())


The new function can be called at any time and will "just work".

  • If called after DOM has loaded, it will immediately highlight.
  • If called before, it will wait until the DOM finishes loading, then
    highlight.

If there are any cases where highlightAll() is needed prior to the DOM onload firing, we can discuss those cases between now and v12. That would seem to be an edge case though I'd guess and could easily be handled with a custom unload handler.

Checklist

  • Added markup tests, or they don't apply here because...
  • Updated the changelog at CHANGES.md
  • Added myself to AUTHORS.txt, under Contributors

@joshgoebel joshgoebel changed the title <!--- Provide a general summary of your changes in the Title above --> (parser) new highlightAll() API Jan 14, 2021
Copy link
Collaborator

@egor-rogov egor-rogov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thing!

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.

None yet

2 participants