title: How to linebreak an svg text within javascript?
body: <p>So here is what I have:</p>
  
  <pre><code>&lt;path class="..." onmousemove="show_tooltip(event,'very long text 
      \\\n I would like to linebreak')" onmouseout="hide_tooltip()" d="..."/&gt;
  
  &lt;rect class="tooltip_bg" id="tooltip_bg" ... /&gt;
  &lt;text class="tooltip" id="tooltip" ...&gt;Tooltip&lt;/text&gt;
  
  &lt;script&gt;
  &lt;![CDATA[
  function show_tooltip(e,text) {
      var tt = document.getElementById('tooltip');
      var bg = document.getElementById('tooltip_bg');
  
      // set position ...
  
      tt.textContent=text;
  
      bg.setAttribute('width',tt.getBBox().width+10);
      bg.setAttribute('height',tt.getBBox().height+6);
  
      // set visibility ...
  }
  ...
  </code></pre>
  
  <p>Now my very long tooltip text doesn't have a linebreak, even though if I use alert(); it shows me that the text actually DOES have two lines. (It contains a "\" though, how do I remove that one by the way?)<br>
  I can't get CDATA to work anywhere.</p>