Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 6 users
Status: Available
Owner: ----
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Sign in to add a comment
JS-created SVG <animate> element does not work
Reported by, Apr 10 2012 Back to list
Chrome Version       : 18.0.1025.151
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
URLs (if applicable) :

Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
     Safari 5: OK
   Firefox 11: OK 
         IE 9: FAIL (SVG SMIL animations not supported)

What steps will reproduce the problem?
1. Load the first URL, click on circle.
--> Animation is triggered (if buggy)
2. Load the second URL, click on the circle.

What is the expected result?
Animation from JS-created `<animate>` element should occur.

What happens instead?
No animation.

Please provide any additional information below. Attach a screenshot if possible.

UserAgentString: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19


The namespaceURI of the <animate> element and all its attributes have been verified to be the same between the working version and the non-working version.
537 bytes View Download
Comment 1 by, Apr 10 2012
Note that (per the answer on Stack Overflow) if the `<animate>` element's attributes are set _before_ the element is appended to the document then it works as desired.
Comment 2 by, Apr 11 2012
Labels: -Area-Undefined Area-WebKit WebKit-SVG
Here's a closely related example involving cloned svg elements. The SMIL animations in the cloned elements never get kicked off, although the cloned child elements all appear to be created and namespaced correctly. This works in Opera and FF, fails in Webkit:

This fiddle might seem to be an oddball use case, but the problem extends to running either importNode() or adoptNode() on an externally loaded SVG as well, which is quite hobbling for dynamic applications using SVG. To make matters worse, running


or even


doesn't get things going in the clone either.

The only way for developers to address this in Webkit is to iterate over all the elements, cueing them by script one at a time, which is a lot of overhead and rather defeats the convenience of declarative animation...
Project Member Comment 4 by, Mar 10 2013
Labels: -Area-WebKit -WebKit-SVG Cr-Content-SVG Cr-Content
Project Member Comment 5 by, Apr 6 2013
Labels: -Cr-Content Cr-Blink
Project Member Comment 6 by, Apr 6 2013
Labels: -Cr-Content-SVG Cr-Blink-SVG
Comment 7 by, Jun 17 2014
Status: WontFix
Works on ToT.
What is ToT? I just tested in Canary and the fiddle in #3 is fixed, but the OP's bug still stands.
Comment 9 by, Jun 18 2014
Labels: -OS-Windows OS-All
Status: Available
Ah, yes, I missed the begin=click in the *-js.svg there... Reopening.
 Issue 449161  has been merged into this issue.
I am working on this bug.
Project Member Comment 12 by, May 13 2015
The following revision refers to this bug:

r195296 | | 2015-05-13T05:54:40.419653Z

Changed paths:

SVG animate element's begin/end attribute set by js, should animate.

When begin/end attribute changed, new conditions can be formed.
So it needs to connect the event base conditions again.


Review URL:
Labels: -Cr-Blink
Removing Cr-Blink from issues that already have Cr-Blink sub-label set.
Comment 14 by, Mar 3 2016
 Issue 232283  has been merged into this issue.
Project Member Comment 15 by, Mar 3
Labels: Hotlist-Recharge-Cold
Status: Untriaged
This issue has been available for more than 365 days, and should be re-evaluated. Please re-triage this issue.
The Hotlist-Recharge-Cold label is applied for tracking purposes, and should not be removed after re-triaging the issue.

For more details visit - Your friendly Sheriffbot
Status: Available
Labels: -Hotlist-Recharge-Cold PaintTeamRetriaged-20170303 BugSource-User
Verified this is still happening.
Sign in to add a comment