0
以下異常的原因是什麼?未能在'SVGTextContentElement'上執行'getStartPositionOfChar'
DOMException: Failed to execute 'getStartPositionOfChar' on 'SVGTextContentElement': The charnum provided (0) is greater than or equal to the maximum bound (0).
實際上,我試圖將https://github.com/nlplab/brat與我自己創建的後端集成在一起。它使用svg與jquery.svg.min.js和jquery.svgdom.min.js。但我被困在這個例外。該exeption的同時使呼叫作爲
text.getStartPositionOfChar(firstChar).x;
,其中文本是
<text x="0" y="0">Some Text</text>
和firstChar=0
SVG的文本元素上引發。