[Dojo-checkins] [Dojo Toolkit] #14288: Loading a custom layer that includes gfx fails under IE7/8
Dojo Trac
trac at dojotoolkit.org
Tue Nov 22 05:20:06 EST 2011
#14288: Loading a custom layer that includes gfx fails under IE7/8
-----------------------+---------------------
Reporter: pruzand | Owner: pruzand
Type: defect | Status: new
Priority: normal | Milestone: 1.7.1
Component: DojoX GFX | Version: 1.6.1
Severity: normal | Keywords:
-----------------------+---------------------
If a custom layer file is created that includes dojox.gfx.canvas, and that
layer file is loaded on a browser which doesn't properly support the
canvas element, then the following code will cause the layer file
evaluation to stop and an Error is raised:
{{{
#!js
if(typeof dojo.doc.createElement("canvas").getContext("2d").fillText !=
"function"){
canvas.Text.extend({
getTextWidth: function(){
return 0;
},
_renderShape: function(){}
});
}
}}}
Specifically, IE browsers break on the call to getContext. This is
problematic primarily because this code will run regardless of whether the
browser supports canvas or not
--
Ticket URL: <http://bugs.dojotoolkit.org/ticket/14288>
Dojo Toolkit <http://dojotoolkit.org>
The Dojo Toolkit
More information about the Dojo-checkins
mailing list