-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allow MathJax root to be configured. #1403 #1525
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Push synchronous, i.e., will there be a return value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the return value is the
MathJax.Callback
object created from the item pushed (Callbacks
can be created from lots of possible data). The important point in returning the last callback pushed is thatCallback
objects are not only functions that can be called, but they also know how to work withMathJax.Callback.Queue
objects; when aCallback
is pushed on aQueue
, theQueue
will block until theCallback
is called, and when it is, the next item in theQueue
will start. But if a queued item returns anotherCallback
, then the queue continues to pause until that callback is called, and so on.So in this case,
ConfigBlocks
is itself pushed on a queue, and that queue will not continue until all the items that have been queued inqueue
in this routine are run, because the outer queue will have to wait for theCallback
object returned byqueue.Push()
, and that only runs after everything else inqueue
has been run.The
MathJax.Callback
was my attempt to do the job that now would be handled by promises, but that idea hadn't been developed (in javascript) at the time, and so the paradigm is a bit more awkward than it should be. It is one of the things that needs fixing in 3.0.