FunctionExpression bug in IE7 - fixed?

V

VK

Sorry for not having IE7 currently available.

Could anyone check if FunctionExpression bug is fixed in IE7 beta or
stay the same (it was once confirmed by IE team, but did they do
anything?)

A minimum test case:

<html>
<head>
<title>bug test</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<script>
var f = (function foo(){});
window.alert(typeof foo);
</script>
</head>
<body>
</body>
</html>

Correct value: "undefined" (FF, Opera)

IE6 reports: "function"
 
S

scriptguru

VK напиÑав:
....
var f = (function foo(){}); ....
Correct value: "undefined" (FF, Opera)

IE6 reports: "function"

Can you show the cases when this can be serious bug?
I can't even imagine.

Val
 
R

Richard Cornford

VK Ð½Ð°Ð¿Ð¸Ñ Ð°Ð²:
...

Can you show the cases when this can be serious bug?
I can't even imagine.

It is not a serious bug. JavaScript(tm) suffered from it for a long time
as well. It has never been a problem because if you really need a named
function you can just declare it in an enclosing scope and then refer to
it by name, if you don't need to refer to a function by name it can then
be anonymous with no consequences, and if you need to call an anonymous
function form inside itself you can use - arguemnts.callee - to refer to
the function.

Richard.
 
V

VK

Can you show the cases when this can be serious bug?
It is not a serious bug.

So is it fixed or not? :) Anyone with the latest IE7 beta installed?

If VK is asking something, it is not always and necessary some deeply
hidden context to search for :)) I really didn't know something and so
asked at c.l.j.

It is a really minor bug (of the level of [1,,2] array initializer or
lower) just needed to be sort out for a really small particular issue.
 
R

Richard Cornford

VK wrote:
Anyone with the
latest IE7 beta installed?
<snip>

Do you really expect to squander so much of everyone's time and effort
and then have them go out of their way to help you?

Richard.
 
S

scriptguru

Richard Cornford напиÑав:
VK wrote:

<snip>

Do you really expect to squander so much of everyone's time and effort
and then have them go out of their way to help you?

Richard.
I would like to help but I hate IE and have no version 7.
I think this bug is not fixed in IE7 because main difference between
IE6 and 7 is interface and security, not scripting.

Val
 
V

VK

I would like to help but I hate IE and have no version 7.

Same 1st, ACK 2nd


P.S. Did you try to give a hand to Old Silver? Poor boy, you don't know
the choice you've just made. :)

P.P.S. Just kidding, really :)
 
L

Laurent Bugnion

Hi,

I would like to help but I hate IE and have no version 7.

You should try IE7. Microsoft really put a lot of effort in making it
much more compliant to standards than the previous versions. In fact, in
Mix06, the IE program manager started his presentation by apologizing to
us for the errors they made in IE6. What I tested in IE7 so far
convinced me that it is probably at least as good as Firefox (I am using
both).
I think this bug is not fixed in IE7 because main difference between
IE6 and 7 is interface and security, not scripting.

I think it's worth a test, because they also fixed many bugs in all
parts of the browser.

HTH,
Laurent
 
R

Richard Cornford

Richard Cornford Ð½Ð°Ð¿Ð¸Ñ Ð°Ð²:
I would like to help but I hate IE and have no version 7.

A willingness to help and an ability to help are often very different
things. VK has put a lot of effort into minimising the willingness to
help among people who would have the ability. What he is left with is
what he is left with.
I think this bug is not fixed in IE7
<snip>

As the bug is in JScript, and JScript uses a DLL that is independent of
the browser, there is no meaningful sense in which the bug could be
'fixed in IE 7". The question is really whether IE 7 will be distributed
with a JScript DLL update that does not feature the bug. If it were the
same DLL could feature in IE 6 updates.

Richard.
 
S

scriptguru

BTW even if they're fixed this bug there are dozen of other bugs in IE
;)
For example I still don't know is it a bug or not:

var dollarCheck=("$".replace(/\$/,"$$").length==1)?true:false
alert(dollarCheck)
//try it in different browsers

But I have to say that sometimes IE is much faster than other browsers
and it is a good side of IE.

Val
 
E

Evertjan.

wrote on 17 sep 2006 in comp.lang.javascript:
BTW even if they're fixed this bug there are dozen of other bugs in IE
;)
For example I still don't know is it a bug or not:

var dollarCheck=("$".replace(/\$/,"$$").length==1)?true:false

(... == ...)?true:false

That is a very useful piece of code!

alert(dollarCheck)
//try it in different browsers

Nothing wrong in IE6
 
S

scriptguru

Evertjan. напиÑав:
(... == ...)?true:false

That is a very useful piece of code!

It only looks not useful but it was critical in application that
replaces strings using regexps.
Nothing wrong in IE6
I don't know who is wrong but it alerts different things in different
browsers.

Val
 
M

Matt Kruse

It only looks not useful but it was critical in application that
replaces strings using regexps.

I believe the sarcasm was to point out that the ?true:false is pointless,
since the (... == ...) already evaluates to a boolean.

Unnecessary use of true/false is often a sign of low-quality code.
 
V

VK

<OT>
That is about the old $ sign treatment (Netscape 4.x - 6.x) and the new
one (introduced by IE 5.5 and currently adopted by others).
I am no way a RegExp specialist, but I just happened to know this issue
as I had to write many price-handling subs and this $ once drawn me
crazy for several hours. Funny thing (and I'm not acting) I used the
very same ? true:false check - because when "$$" results in "$" from
skies blue, an hour later you are starting wondering if true is still
true and false is false :)

Namely by old rules $ sign in the replacement string was just a
character (unless $1 and stuff). So to replace "$" with "$$" it was
enough:
var foo = "$".replace(/\$/,"$$"); // "$$";
But starting from IE 5.5 (and from one of endless beta's of NN 6)
double dollar sign $$ means single dollar sign $:
var foo = "$".replace(/\$/,"$$"); // "$";
var foo = "$".replace(/\$/,"$$$$"); // "$$";
....still hate them for that... :)
</OT>

So anyone with IE7 beta installed? (if not - so not, I have to wait
until I return home to one of test machines).

A minimum test case:

<html>
<head>
<title>bug test</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<script>
var f = (function foo(){});
window.alert(typeof foo);
</script>
</head>
<body>
</body>
</html>

Correct value: "undefined" (FF, Opera)

IE6 reports: "function"
 
G

George3

VK said:
Correct value: "undefined" (FF, Opera)

IE6 reports: "function"


IE7 RC-1 on my PC also reports "function".
It appears IE7 is being distributed with a newer jscript.dll. The dll
in C:\WINDOWS\SYSTEM32\ is version 5.7.0.5700 (476kb) and the IE7
version is 7.0.5700.6. On my other PC with IE6 jscript.dll is at
version 5.6.0.8831

George.
 
S

scriptguru

Matt Kruse напиÑав:
I believe the sarcasm was to point out that the ?true:false is pointless,
since the (... == ...) already evaluates to a boolean.

Unnecessary use of true/false is often a sign of low-quality code.
Thanks, Matt
I was so swampted with bugs and I didn't noted this issue. Sure
true:false is redundant here!

Val
 
V

VK

George3 said:
IE7 RC-1 on my PC also reports "function".
It appears IE7 is being distributed with a newer jscript.dll. The dll
in C:\WINDOWS\SYSTEM32\ is version 5.7.0.5700 (476kb) and the IE7
version is 7.0.5700.6. On my other PC with IE6 jscript.dll is at
version 5.6.0.8831

Thank you very much for your help
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Sun, 17
Sep 2006 18:04:59 remote, seen in Richard
Cornford said:
VK wrote:

<snip>

Do you really expect to squander so much of everyone's time and effort
and then have them go out of their way to help you?


There is no need for you to argue with everything that VK writes; others
can do that. It would be better to spend the time on your volunteered
task of maintaining the newsgroup FAQ - or finding someone else to do
it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top