Opened 8 years ago

Closed 8 years ago

#13803 closed defect (fixed)

dojox/gfx/tests/svgweb/test_gfx.html throws error in dojo/on under IE

Reported by: Patrick Ruzand Owned by: Eugene Lazutkin
Priority: high Milestone: 1.7
Component: Core Version:
Keywords: Cc: pruzand@…
Blocked By: Blocking:

Description

under IE 8, loading dojox/gfx/tests/svgweb/test_gfx.html (all svgweb tests in fact) throws an error in dojo/on l.159 :

if(target.addEventListener){

the target has addEventListener, which[...snip...] check for capture conversions var capture = type in captures; <<<<< captures is undefined (=>"Object expected" error.)

the 'captures' variable initialization is done only if has("dom-addeventlistener")) is true, which is not the case here. The problem is that svgweb has added the missing addEventListener() method to the target element (window), which in a way conflict with the has(..) feature detection done previously, and therefore messes up the on.js code flow, since it will detect here the addEventListener method and assumes 'captures' is defined. Maybe on.js should ensure the 'captures' variable is defined ?

(see http://code.google.com/p/svgweb/source/browse/trunk/src/svg.js?r=1089 l.2183 where the addEventListener extension is done)

Change History (3)

comment:1 Changed 8 years ago by Patrick Ruzand

Component: DojoX GFXCore

comment:2 in reply to:  1 Changed 8 years ago by Patrick Ruzand

Replying to pruzand: Moved to Core , as dojo/on _seems_ to be the one to fix.

comment:3 Changed 8 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

In [26424]:

Add captures object in case of crazy addEventListener augmentation, fixes #13803 !strict

Note: See TracTickets for help on using tickets.