You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MathJax 2.7.3 (EOL; 3.x since 2019, 4.x current). Split-brain delivery: the render path hard-codes the cdnjs CDN URL (kMPMathJaxCDN, MPRenderer.m:26), and the legacy WebResourceLoadDelegate swaps in the bundled local copy at runtime (MPDocument.m:1268-1281, workaround for MathJax hangs Chrome mathjax/MathJax#548).
The CSP must whitelist cdnjs.cloudflare.comand 'unsafe-eval' for MathJax 2.x (MPRenderer.m:508).
Typeset-completion is bridged via MPMathJaxListener + windowScriptObject (MathJax/init.js:10; MPDocument.m:1303, 1679) so native code can restore scroll position after typesetting.
The WKWebView migration breaks all three legs anyway: there is no per-resource willSendRequest hook (the CDN-swap dies), the windowScriptObject bridge becomes a WKScriptMessageHandler, and the DOM-replacement re-typeset script (MPDocument.m:1627-1683, MathJax.Hub.Queue) is 2.x-specific API. Since the completion-hook and delivery mechanisms must be rewritten regardless, rewriting them against a supported MathJax does the work once:
MathJax 3/4: MathJax.typesetPromise() replaces Hub.Queue — a cleaner fit for the async message-channel architecture (decision register D-6)
Fully local delivery via the Migrate from WebView to WKWebView #111 scheme handler kills the CDN dependency and lets the CSP drop 'unsafe-eval' and the CDN whitelist
Smaller bundle: 3/4 are modular; 2.x's local fallback + config machinery goes away
Note: milestone v3000.1.0 is deliberately WKWebView-only ("nothing else rides this train"), so this is either scoped as part of #111's JS-library verification phase or lands in the next train — maintainer's call. What should NOT happen is porting the 2.x CDN-swap + Hub.Queue machinery to WKWebView and then rewriting it again.
Migration checkpoints
Delimiter config: hoedown/cmark emit \(…\) / \[…\] — configure tex2jax/tex.inlineMath equivalently (2.x currently relies on CDN default config TeX-AMS-MML_HTMLorMML, MPRenderer.m:26-28)
Current state (survey §4.3, §1.2)
kMPMathJaxCDN,MPRenderer.m:26), and the legacyWebResourceLoadDelegateswaps in the bundled local copy at runtime (MPDocument.m:1268-1281, workaround for MathJax hangs Chrome mathjax/MathJax#548).cdnjs.cloudflare.comand'unsafe-eval'for MathJax 2.x (MPRenderer.m:508).MPMathJaxListener+windowScriptObject(MathJax/init.js:10;MPDocument.m:1303, 1679) so native code can restore scroll position after typesetting.Why this rides with (or immediately after) #111
The WKWebView migration breaks all three legs anyway: there is no per-resource
willSendRequesthook (the CDN-swap dies), thewindowScriptObjectbridge becomes aWKScriptMessageHandler, and the DOM-replacement re-typeset script (MPDocument.m:1627-1683,MathJax.Hub.Queue) is 2.x-specific API. Since the completion-hook and delivery mechanisms must be rewritten regardless, rewriting them against a supported MathJax does the work once:MathJax.typesetPromise()replacesHub.Queue— a cleaner fit for the async message-channel architecture (decision register D-6)'unsafe-eval'and the CDN whitelistNote: milestone v3000.1.0 is deliberately WKWebView-only ("nothing else rides this train"), so this is either scoped as part of #111's JS-library verification phase or lands in the next train — maintainer's call. What should NOT happen is porting the 2.x CDN-swap +
Hub.Queuemachinery to WKWebView and then rewriting it again.Migration checkpoints
\(…\)/\[…\]— configure tex2jax/tex.inlineMathequivalently (2.x currently relies on CDN default configTeX-AMS-MML_HTMLorMML,MPRenderer.m:26-28)htmlMathJaxInlineDollarpreference behavior preservedMPMathJaxScrollTests.m)MPMathJaxRenderingTests.m) still pass — they assert on pre-typeset HTML, so should be unaffected; confirmReferences
plans/dependency-overhaul-survey.md§1.2, §1.7, §4.3 (branchclaude/dependencies-overhaul-planning-hw3lms)plans/dependency-overhaul-decisions.mdD-8