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

SVG 1.1 19.3 proposed testcase for script and DOM

From: Jonathan Chetwynd <j.chetwynd@btinternet.com>
Date: Fri, 25 Jun 2010 10:28:30 +0100
Message-Id: <D3926957-4785-450C-A0B5-7AD6B33DDCED@btinternet.com>
To: www-svg <www-svg@w3.org>
SVG 1.1
19.3 Animation using the SVG DOM

If scripts are modifying the same attributes or properties that are  
being animated by SVG's animation elements, the scripts modify the  
base value for the animation. If a base value is modified while an  
animation element is animating the corresponding attribute or  
property, the animations are required to adjust dynamically to the new  
base value.

No testcase is currently linked,
Please find attached a proposed testcase.

In my tests with recent builds of Mozilla Opera and Safari all three  
Is there a problem with the implementations or is it the testcase?


please note in each case the alert message reported the fill was red,  
but appearance is green.


Jonathan Chetwynd

where animation is not implemented fakesmile was used via <script  
type='text/ecmascript' xlink:href='smil.user.js' />

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"

	<title>Script should over-ride set attributeName="fill" testcase</ 

    <text x="20" y="20" >Click the green rectangle, then the circle.  
Refresh and start with the red circle</text>

<g id="neutral" fill="#cca" >
<set attributeName="fill" to="green" begin="fillGreen.click"   />
     <rect x="16" y="38" width="150" height="21"  rx='4' ry='4'/>

     <rect x="176" y="38" width="50" height="21"  rx='4' ry='4'   
fill="green"  pointer-events="fill" cursor="pointer" id="fillGreen"/>

<g id="scriptFillRed" >
    <text x="241" y="78" stroke="#f00" text-anchor="middle" >></text>
   <circle stroke-width="2" stroke="#f00" fill="none"  r="9" cx="240"   
cy="75" pointer-events="fill" cursor="pointer"  onmousedown="fill()" />

<script type="text/ecmascript" ><![CDATA[


function fill() {
'fill', 'red');
alert(document.getElementById("neutral").getAttributeNS(null, 'fill'));


--> ]]></script>

Received on Friday, 25 June 2010 09:28:35 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:29:44 UTC