From 95f632a6bd3e1270bc0625b1f4a6c7600abfcea4 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 18 Mar 2015 11:23:45 -0400 Subject: [PATCH] Add autoload ability and stubs for the elements that need autoloading. --- unpacked/jax/output/CommonHTML/jax.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index bb0135e23..17f5a5ab0 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -1341,6 +1341,17 @@ } },{ + // + // Autoload files based on node type or file name + // + HTMLautoload: function () { + var file = CHTML.autoloadDir+"/"+this.type+".js"; + HUB.RestartAfter(AJAX.Require(file)); + }, + HTMLautoloadFile: function (name) { + var file = CHTML.autoloadDir+"/"+name+".js"; + HUB.RestartAfter(AJAX.Require(file)); + }, // // For use with embellished operators // @@ -2277,10 +2288,19 @@ return node; } }); - MML.annotation.Augment({toCommonHTML: function(node) {}}); + MML.annotation.Augment({toCommonHTML: function(node) {return this.CHTMLcreateNode(node)}}); MML["annotation-xml"].Augment({toCommonHTML: function(node) {}}); +// MML["annotation-xml"].Augment({toCommonHTML: MML.mbase.CHTMLautoload}); /********************************************************/ + +// MML.ms.Augment({toCommonHTML: MML.mbase.CHTMLautoload}); +// MML.mglyph.Augment({toCommonHTML: MML.mbase.CHTMLautoload}); +// MML.menclose.Augment({toCommonHTML: MML.mbase.CHTMLautoload}); +// MML.maction.Augment({toCommonHTML: MML.mbase.CHTMLautoload}); +// MML.mmultiscripts.Augment({toCommonHTML: MML.mbase.CHTMLautoload}); + + /********************************************************/ // // Loading isn't complete until the element jax is modified,