Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

JScript bug in IE 6, 7, 8

microsoft.public.internetexplorer.general






Speedup My PC
Reply
  #1 (permalink)  
Old 07-30-2009
Federico Lebrón
 

Posts: n/a
JScript bug in IE 6, 7, 8
I didn't know where else to report this - is this the correct place? If not,
where should I do so?
Basically there's a bug on how IE's JScript expands global variable names.

If one does
for(foo in {'a':'b', 'c':'d'}) { alert(foo); }
One gets the expected alerts for 'a' and 'c'.

However, if one chooses to use the variable name 'item', as such:
for(item in {'a':'b', 'c':'d'}) { alert(item); }

One gets an error, saying the 'object does not support this action'. Digging
a bit deeper, this happens not only with the word 'item', but any property of
the window object, or its prototype (any property to which it responds, like
toString). It seems IE JScript is expanding 'item' to 'window.item', and what
results is 'for(window.item in ...', which is wrong.

This does not happen if scoping with the 'var' keyword, since then the
engine knows it's a local variable, not a property of the global object.

There's a few reports of this on the web, but I figure I'd report it and see
if it can get fixed in IE9 or whatever the next version is? I couldn't find
any reports directly to MS on the matter.

Cheers.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-30-2009
PA Bear [MS MVP]
 

Posts: n/a
Re: JScript bug in IE 6, 7, 8
IE Developer Center
http://msdn.microsoft.com/en-us/ie/default.aspx

Learn IE8
http://msdn.microsoft.com/en-us/ie/aa740473.aspx

Or you could post here instead:

MSDN IE Development Forums
http://social.msdn.microsoft.com/for...iedevelopment/


Federico Lebrón wrote:
> I didn't know where else to report this - is this the correct place? If
> not,
> where should I do so?
> Basically there's a bug on how IE's JScript expands global variable names.
>
> If one does
> for(foo in {'a':'b', 'c':'d'}) { alert(foo); }
> One gets the expected alerts for 'a' and 'c'.
>
> However, if one chooses to use the variable name 'item', as such:
> for(item in {'a':'b', 'c':'d'}) { alert(item); }
>
> One gets an error, saying the 'object does not support this action'.
> Digging
> a bit deeper, this happens not only with the word 'item', but any property
> of the window object, or its prototype (any property to which it responds,
> like toString). It seems IE JScript is expanding 'item' to 'window.item',
> and what results is 'for(window.item in ...', which is wrong.
>
> This does not happen if scoping with the 'var' keyword, since then the
> engine knows it's a local variable, not a property of the global object.
>
> There's a few reports of this on the web, but I figure I'd report it and
> see
> if it can get fixed in IE9 or whatever the next version is? I couldn't
> find
> any reports directly to MS on the matter.
>
> Cheers.


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Jscript error MEP microsoft.public.windowsupdate 2 10-24-2009 18:55
Can't Register Jscript and VBscript error 0x80004005 minepassport microsoft.public.windows.vista.administration accounts passwords 2 07-05-2009 16:58
Re: Microsoft Jscript compilation error - expected ';' PA Bear [MS MVP] microsoft.public.internetexplorer.general 23 01-09-2009 09:12
Runtime erroron JScript jlp microsoft.public.windowsupdate 2 01-04-2009 22:50
jscript error Grawlr microsoft.public.windows.vista.general 1 09-24-2007 05:39




All times are GMT +1. The time now is 12:34.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120