W3C home > Mailing lists > Public > www-svg@w3.org > October 2010

SVG 1.1 Does no text exist in the DOM? or why no eggs?

From: Jonathan Chetwynd <j.chetwynd@btinternet.com>
Date: Sat, 2 Oct 2010 22:44:10 +0100
Message-Id: <E07466C9-7FB6-4C08-9201-7AA410D5345E@btinternet.com>
To: www-svg <www-svg@w3.org>
Does no text exist in the DOM? or why no eggs?

<text></text> should to my way of  thinking provide a handle for  
script to enter  text into the DOM, but it doesn't in ff opera or  
so why not?
ie is there a specification that defines this behaviour?
hard to file a bug, as I cant fathom this out.


Jonathan Chetwynd

in this testcase onmouseover, "ham'n" gets displayed, but no 'eggs'

this  may likely be correct, but what is the benefit, or purpose?
and what the workaround?

please note that once instantiated, on can remove all the content, and  
add new content, but not apparently start with no content.
not a very nice workaround.....

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="80" y="75" id="chat" width="45" height="36" fill="#cca"  
onmouseover="addText()" />
<text id="chatText" x="83" y="90" > </text>
<text id="chat2Text" x="83" y="105" ></text>

<script type="text/ecmascript"> <![CDATA[
function addText(){
         e = document.getElementById("chatText");
         2e = document.getElementById("chat2Text");
Received on Saturday, 2 October 2010 21:50:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:28 UTC