Opened 10 years ago

Closed 10 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: [email protected]
Blocked By: Blocking:


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


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 l.2183 where the addEventListener extension is done)

Change History (3)

comment:1 Changed 10 years ago by Patrick Ruzand

Component: DojoX GFXCore

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

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

comment:3 Changed 10 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.