Re: Request For Feedback: Traits

* Cameron McCormack wrote:
>Bjoern Hoehrmann:
>> Note that TraitAccess does not offer a way to rewrite the code above,
>> getFloatTrait would throw an exception and getTrait cannot be used at
>> all for 'x' attributes. rect.x.baseVal.value and rect.x.baseVal.value
>> InSpecifiedUnits handle this and can be changed without calling any
>> setFoo methods.
>
>Why does getFloatTrait throw an exception here?

http://www.w3.org/TR/2005/WD-SVGMobile12-20051207/svgudom.html

  If the width is specified as a percentage or unit value (only
  possible for the 'svg' 'width'), a DOMException with error code
  TYPE_MISMATCH_ERR is raised since the requested trait's computed
  value cannot be converted to a float.

It does not discuss 'x' attributes with unit identifiers since those are
not allowed in SVG Tiny 1.2, though I see no reason to expect this to be
different in SVG 1.2 "Full".
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Wednesday, 4 January 2006 23:44:52 UTC