11 | | 2. It is a reflection of a DOM attribute. This means, setAttribute() should, affect the SVG property once it is called. Also getAttribute() should reflect the latest changed value of the SVG property. Let's call updating the SVG property from the attribute 'synchronize'. And let's call updating the attribute from the SVG property 'commit' |
| 11 | 2. It is a reflection of a DOM attribute. Two cases need to be handled |
| 12 | a. When setAttribute called for the underlaying attribute, SVGElement::parseAttribute() will be called to update th SVG property and then SVGElement::svgAttributeChanged() is called to invalidate the renderer and the dependent SVG objects. |
| 13 | b. When the SVG property is changed through the DOM interface. In this handed in two steps: (1) commit and (2) synchronize. The commit step is called immediately after changing the property. It will mark value of the underlaying attribute to be invalid and it call SVGElement::svgAttributeChanged(). The synchronize. step happens later when the value of attribute is required. The valueAsString(0 of the SVG property is set as the attribute. value. |