'splitText' fails and throws an exception ("A text node needs a parent node in order to be split") when the text node is created directly in 'document'. It doesn't appear to be a requirement of 'splitText' that it should be lower down in the DOM. This isn't an issue in Chrome, Firefox, Safari, Opera, and IE9+.
This code works in the 5 major browsers, but fails in squiggle (and fails silently in the rasteriser):
var ltnode, rtnode;
ltnode = svg_doc.createTextNode(input); // 'svg_doc' is 'document'
When the exception is thrown, the debugger shoes 'svg_doc' as 'org.apache.batik.dom.svg.SVGOMDocument'. The Chrome debugger shows it as 'document' at the same point in execution.