Opened 7 years ago

Closed 3 years ago

#14721 closed defect (patchwelcome)

dojox.lang.utils.coerceType() fails for functions in IE8

Reported by: skaterkfbs Owned by: Eugene Lazutkin
Priority: undecided Milestone: 1.13
Component: Dojox Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:

Description

There's some bug where IE won't return the function in an eval() command unless it's being assigned. I was able to get this function working as I expected by changing line 29 of /dojox/lang/utils.js

From:

return eval('(' + source + ')');

To:

var result;
return eval('result = (' + source + ')');

Test case:

var a = "function(){}",
b = function(){};
c = dojox.lang.utils.coerceType(b, a);

Current Result:

typeof c === 'undefined'

Expected Result:

typeof c === 'function'

Change History (4)

comment:1 Changed 7 years ago by Adam Peller

Owner: changed from Adam Peller to Eugene Lazutkin
Status: newassigned

comment:2 Changed 7 years ago by skaterkfbs

It looks like this problem was resolved with IE9 as long as the 'Document Mode' is 'IE9 standards'

comment:3 Changed 6 years ago by bill

Summary: dojox.lang.utils.coerceType() fails for functions in IE 8dojox.lang.utils.coerceType() fails for functions in IE8

comment:4 Changed 3 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: assignedclosed

Given that no one has shown interest in creating a patch in the past 3+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.