Blog  |   Sitemap  |   Search  |   Language:  eng рус
Ajax GUI FrameworkBug TrackerBug details

Bug Data

ID: #0156
Status: Fixed
Severity: Normal
Reporter: Danny Drobnitch
Submitted: 04-11-09 22:06

Product Data

Product: Ample SDK
Component: SVG 1.2 Tiny
Version: 0.8.x
OS: > Any
Browser: > Any


Cannot set attributes on detached Ample SVG elements

Ample SDK throws and error when trying to set the attributes of a SVG element before it is attached to the DOM using either setAttribute or setAttributeNS.

var newNode = ample.createElementNS("", "circle");

var container = ample.getElementById("container");

I looked at the code a bit and this may be a possible solution, but I am unsure of the implications. It might be possible to change the setAttribute method in the cSVGElement.js file to:

var oElement;

if (sName != "id" && sName != "class")
if(oElement = this.$getContainer())
oElement.setAttribute(sName, sValue);

Messages written for this bug

Reporter: Lev Matematik
Submitted: 05-11-09 15:00
Message: This only happened on non-IE browsers. Fixed now by adding a check for the shadow DOM presence.

Add a message