Well...in most cases you won't need both AsciiMathML and AsciiSVg - you will need either maths or graphs. If you want to use only asciimath with JSXGraphs you may not want to load AsciiSVG - or you may want to use 2 different versions of AsciiSVG (old style and plugin style) with different variables but want to use only TeX with TeX filter...
It is possible to collect all options to one mega script or split scripts to smaller tasks and move some tasks for example to php scripts. If we want to use configurable settings it is easier to use php for settings and remove most variables from javascript:
AM1.php - settings for AM
AM1.js - javascript functions for AM
AS1.php - settings for AS
AS1.js - javascript functions for AS
If we want we can split AM1.js to 2 smaller scripts - MathML and fallback parts - and load only MathML script for FF and fallback script without MathML parts for other browsers.
If we want we can split AsciiSVG to 2 smaller scripts - fallback parts for IE only and SVG parts of other browsers.
Then we can use browser detection and set IE directly to load only settings and IE functions without 100 tests if (isIE) {...} ... or if (ASnoSVG) {...} and do the same for FF and other browsers which means probably 3 scripts:
IE.php (all fallback & png or VML)
FF.php (MathML & SVG)
Webkit.php (fallback & SVG)
What do you mean, Marc, by "...if we are not going to be able to use jsxgraph without including JavaScript tag..." ?
I suppose we might be able to use GeoNext applets for addings tags, we might be able to use filters to replace applet strings with graphs, we might be able to create a filter for addings jsxgraph (script) tags, we might be able to create an editor plugin for adding jsxgraphs just like in AsciiSVG plugin...?
Or we might be able to combine best features of AsciiSVG and JSXGraphs and some math renderer (Google Chart API?) together with Dragmath to one simple plugin or two simple plugins that output graphs and maths as vector graphics and MathML/fallback images that are editable and visible in editor, more accessible for screen readers and have the most common functions for school use - but not all the features of different renderers.
Or we might be able to select default renderer from administration menu ($CFG->... given by math filter settings ) and let script select different input and output values according to this setting - or we might be able to do the same with some classes or class names without tokens and delimiters or with tags like
math/ AM ...tags here... /math
graph/ JSX ...tags here... /graph
( or why not as well math/ JSX ...tags here... /math for graphs too if we had just one mega filter for all kinds of maths and graphs - no more worries about dollars etc ... but dollars, backticks and other old stuff could still be used like before)