Opened 11 years ago

Closed 11 years ago

#12916 closed defect (fixed)

[patch][ccla] dojox.gfx.utils.toSvg() broken under IE8 (in ie8 mode)

Reported by: Patrick Ruzand Owned by: Eugene Lazutkin
Priority: high Milestone: 1.7
Component: DojoX GFX Version: 1.5
Keywords: 1.7-mobile Cc: [email protected]
Blocked By: Blocking:


The dojox.gfx.utils.toSvg function does not work on IE8 (in IE8 standards mode). The callback of the returned Deferred object seems never to be called. This can be reproduced by running the test case: dojox/gfx/tests/test_utils.html on IE8 (make sure to run it o IE8 standards mode).

The issue is indeed specific to IE8, and lies in the dojox/gfx/utils.js file, l.233:

var uri = (dojo.config["dojoxGfxSvgProxyFrameUrl"]||dojo. moduleUrl("dojox","gfx/resources/gfxSvgProxyFrame.html"));
f.setAttribute("src", uri);

Here, 'uri' is a dojo url object (whose toString() has been overriden to return the uri as a string). In 1.6, f.setAttribute(...) invokes the uri toString() method, so it gives something like:

src = "http://blablabla/../../../dojox/gfx/resources/thegfxproxy.html";

in IE8, the toString() is not invoked anymore, and the result is :

src = "../../../blabalbla/[object]

According to msdn (, IE8 does not support "DHTML expressions" for the attribute value anymore. I guess a JavaScript? object fells into this category and explain the faulty behavior.

the fix is to explicitely call uri.toString() when setting 'src' attribute:

f.setAttribute("src", uri.toString());

Attachments (1)

12916.patch (542 bytes) - added by Patrick Ruzand 11 years ago.

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by Patrick Ruzand

Attachment: 12916.patch added

comment:1 Changed 11 years ago by Chris Mitchell

Resolution: fixed
Status: newclosed

(In [24920]) fixes #12916 dojox.gfx.utils.toSvg() broken under IE8 in ie8 mode

Note: See TracTickets for help on using tickets.