By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,605 Members | 2,129 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,605 IT Pros & Developers. It's quick & easy.

FunctionExpression bug in IE7 - fixed?

P: n/a
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"

Sep 17 '06 #1
Share this Question
Share on Google+
17 Replies


P: n/a

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

Sep 17 '06 #2

P: n/a
sc********@gmail.com wrote:
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.
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.
Sep 17 '06 #3

P: n/a
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.

Sep 17 '06 #4

P: n/a
VK wrote:
<snip>
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.
Sep 17 '06 #5

P: n/a

Richard Cornford написав:
VK wrote:
<snip>
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.
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

Sep 17 '06 #6

P: n/a
VK
sc********@gmail.com wrote:
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 :-)

Sep 17 '06 #7

P: n/a
Hi,

sc********@gmail.com wrote:
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.
Val
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Sep 17 '06 #8

P: n/a
sc********@gmail.com wrote:
Richard Cornford напи ав:
>VK wrote:
<snip>
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?
<snip>
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.
Sep 17 '06 #9

P: n/a

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

Sep 17 '06 #10

P: n/a
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
>
But I have to say that sometimes IE is much faster than other browsers
and it is a good side of IE.

Val
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Sep 18 '06 #11

P: n/a

Evertjan. написав:
var dollarCheck=("$".replace(/\$/,"$$").length==1)?true:false

(... == ...)?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.
alert(dollarCheck)
//try it in different browsers

Nothing wrong in IE6
I don't know who is wrong but it alerts different things in different
browsers.

Val

Sep 18 '06 #12

P: n/a
sc********@gmail.com wrote:
>(... == ...)?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.
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.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Sep 18 '06 #13

P: n/a
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"

Sep 18 '06 #14

P: n/a
VK wrote:
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.

Sep 18 '06 #15

P: n/a

Matt Kruse написав:
sc********@gmail.com wrote:
(... == ...)?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.

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.

--
Matt Kruse
Thanks, Matt
I was so swampted with bugs and I didn't noted this issue. Sure
true:false is redundant here!

Val

Sep 18 '06 #16

P: n/a
VK

George3 wrote:
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

Sep 18 '06 #17

P: n/a
JRS: In article <ee*******************@news.demon.co.uk>, dated Sun, 17
Sep 2006 18:04:59 remote, seen in news:comp.lang.javascript, Richard
Cornford <Ri*****@litotes.demon.co.ukposted :
>VK wrote:
<snip>
>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?

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.

--
John Stockton, Surrey, UK. ??*@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL:http://www.merlyn.demon.co.uk/- FAQish topics, acronyms, & links.
Check boilerplate spelling -- error is a public sign of incompetence.
Never fully trust an article from a poster who gives no full real name.
Sep 19 '06 #18

This discussion thread is closed

Replies have been disabled for this discussion.