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

Clarification of "baseVal"

From: Antoine Quint <antoine@graougraou.com>
Date: Mon, 7 Oct 2002 17:56:02 +0200
To: www-svg@w3.org
Message-Id: <4794679E-DA0D-11D6-9B11-0003931E5C64@graougraou.com>

Hi there,

I need a little bit of clarification as to what the core difference is 
between baseVal and the core DOM value of an attribute. Say I have the 
following example:

<rect width="100" height="100">
   <animate attributeName="width" dur="2s" to="200" fill="freeze" />
</rect>

Here is a bit of DOM code executed at 1s within the document timeline, 
are my assumptions correct (I am not aware of any implementation to 
test this):

var width = rect.width.baseVal; // 100
width = rect.width.animatedVal; // 150
rect.setAttributeNS(null, 'width', 500);
width = rect.width.baseVal; // 100

How about at 2s (animation over and frozen)?

var width = rect.width.baseVal; // 100
width = rect.width.animatedVal; // 200

Thanks for advice,

Antoine
Received on Monday, 7 October 2002 11:54:22 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:23 GMT