#794 closed defect (fixed)
dojo.lang.isAlien intermittently broken on IE6/7
Reported by: | Owned by: | Ben Lowery | |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | Core | Version: | 0.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
For some instances of IE6 / IE7 Beta 2, dojo.lang.isAlien bombs out attempting to turn the a function like window.setTimeout into a string to perform the RegEx?, saying "Object does not support this action".
Easiest fix seems to be to lift the isAlien from Crockford.
Attachments (1)
Change History (12)
comment:1 Changed 16 years ago by
Milestone: | → 0.5 |
---|
comment:2 Changed 16 years ago by
Owner: | changed from anonymous to alex |
---|
Changed 16 years ago by
Attachment: | test_lang_common.html added |
---|
comment:3 Changed 16 years ago by
I've attached a test case that should exercise the dojo.lang.isAlien function appropriately, but I'm not able to break IE6 or IE7 with it. I guess this one can be marked closed, as I can no longer reproduce the bug.
comment:4 Changed 15 years ago by
Oop, now it's busted again. Yay intermittent bugs.
Here's what I added to lang.common, just after the normal isAlien def: (function(){
if((dojo.render.html.capable)&&(dojo.render.html.ie)){
dojo.lang.isAlien = function(/*anything*/ it){
return it !== null && dojo.lang.isObject(a) && typeof a.constructor != 'function';
};
}
})();
comment:5 Changed 15 years ago by
Actually, that code is busted. This is better:
(function(){ if((dojo.render.html.capable)&&(dojo.render.html.ie)){ dojo.lang.isAlien = function(/*anything*/ it) { if(!it) { return false; } return dojo.lang.isObject(it) && typeof(it.constructor) != 'function'; } } })();
comment:6 Changed 15 years ago by
Owner: | changed from alex to Ben Lowery |
---|
Hey Ben. You're a committer now, you can have this one :) Can you please assess whether we still need this?
comment:7 Changed 15 years ago by
Unsure if this is still needed. Let's leave it open just in case, but defer it.
comment:8 Changed 15 years ago by
Milestone: | 0.9 → 1.0 |
---|
comment:10 follow-up: 11 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Resolving as Fixed. Can't repro any more.
comment:11 Changed 15 years ago by
Replying to blowery:
Resolving as Fixed. Can't repro any more.
I ran into a similar issue explained here and it ended up being related to if the Ask.com Toolbar was installed. Having that installed caused isAlien() to throw an exception. I resolved it by just wrapping it in a try/catch and defaulting on returning false. Just an FYI.
Chris
Test case for lang.common's isAlien