473,396 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

'in' operator and feature detection technique...

We all know that feature detection technique works from very beggining
of user-agents supporting JavaScript. We can alway check if eg.
document has a write property or smth else:

if(document.write) {

}

We could do that for all of objects, so i have been surprised when i
found 'in' operator, which for above example would be used like this:

if("write" in document) {

}

So i have questioned myself what for ? I can always do:

if(document["write"]) {

}

or even
var prop = [...];

if(document[prop]) {

}

which is supported better then 'in' operator ('in' is supported since
W. IE 5.5 and NN 6 - around 2000 year). I can only guess that 'in' was
provided in W. IE 5.5 only for convenience... but that is my guess and
someone more knowlegable could write here some more opinions on this
operator...

B.R.
Luke Matuszewski

Feb 9 '06 #1
22 1722

Luke Matuszewski napisal(a):
if(document.write) {
if(document["write"]) {
var prop = [...];

if(document[prop]) {
, which will not work if document has a write property and it has null
or undefinded value (so in operator can tell if object has property in
question even if this property is null or undefined).
if("write" in document) {


, results true if document has write property even if it is null or
undefined.

I do not see other reasons for using 'in' operator (detecting property
of object even if it is null or undefined). Here is a test case:

var ob = { prop: " [ property value ] " };
if(ob.prop) {
alert("feature detection: " + ob.prop);
}

if("prop" in ob) {
alert("in operator: " + ob.prop);
}

ob.prop = null;

if(ob.prop) {
alert("feature detection(ob.prop==null): " + ob.prop);
}

if("prop" in ob) {
alert("in operator(ob.prop==null): " + ob.prop);
}

ob.prop = window.window1234567890; /* ob.prop == undefined */

if(ob.prop) {
alert("feature detection(ob.prop==null): " + ob.prop);
}

if("prop" in ob) {
alert("in operator(ob.prop==null): " + ob.prop);
}

B.R.
Luke Matuszewski

Feb 9 '06 #2


Luke Matuszewski wrote:

if("write" in document) { So i have questioned myself what for ? I can always do:

if(document["write"]) {
I can only guess that 'in' was
provided in W. IE 5.5 only for convenience...


The in operator checks whether there is a property with the name as the
first operand, that is much different to converting the property value
to a boolean (which if () does).

Example

var testObject = {
b : false,
s : '',
n: 0
};

var results = '';

for (var propertyName in testObject) {
results += 'Boolean(obj["' + propertyName + '"]): ' +
Boolean(testObject[propertyName]) + '\r\n';
results += '"' + propertyName + '" in obj: ' +
(propertyName in testObject) + '\r\n\r\n';
}

results
yields

Boolean(obj["b"]): false
"b" in obj: true

Boolean(obj["s"]): false
"s" in obj: true

Boolean(obj["n"]): false
"n" in obj: true
--

Martin Honnen
http://JavaScript.FAQTs.com/
Feb 9 '06 #3
VK

Luke Matuszewski wrote:
We all know that feature detection technique works from very beggining
of user-agents supporting JavaScript. We can alway check if eg.
document has a write property or smth else:

if(document.write) {

}

We could do that for all of objects, so i have been surprised when i
found 'in' operator, which for above example would be used like this:

if("write" in document) {

}

So i have questioned myself what for ? I can always do:

if(document["write"]) {

}

or even
var prop = [...];

if(document[prop]) {

}

which is supported better then 'in' operator ('in' is supported since
W. IE 5.5 and NN 6 - around 2000 year). I can only guess that 'in' was
provided in W. IE 5.5 only for convenience... but that is my guess and
someone more knowlegable could write here some more opinions on this
operator...


('property' in someObject) is not intended for features test - though
it can be used and it is used this way (when the support for
prehistoric browsers is not a requirement).

But originally it was introduced with it counterpair hasOwnProperty for
prototype-based inheritance management.

This very primitive sample you can play with is rather
self-explanatory.

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1251">
<script type="text/javascript">

var myObject = new Object();
myObject.constructor.prototype.p1 = true;
myObject.p2 = true;

alert('p1' in myObject); // true
alert('p2' in myObject); // true

alert(myObject.hasOwnProperty('p1')); // false
alert(myObject.hasOwnProperty('p2')); // true
</script>
</head>

<body>

</body>
</html>
P.S.
The "in" operator checks if an object has a property named property. It
also checks the object's prototype to see if the property is part of
the prototype chain.

The "hasOwnProperty" method returns true if object has a property of
the specified name, false if it does not. This method does not check if
the property exists in the object's prototype chain; the property must
be a member of the object itself.

Feb 9 '06 #4
VK wrote:
('property' in someObject) is not intended for features test - though
it can be used and it is used this way (when the support for
prehistoric browsers is not a requirement).
So your history begins not long before 2000 CE? That would explain some
of your misconceptions, although not all of them.
But originally it was introduced with it counterpair hasOwnProperty for
prototype-based inheritance management.
Nonsense.

JavaScript 1.0 and ECMAScript implementations (e.g. JavaScript 1.1+, JScript
1.0+) have always been languages that used prototype-based inheritance.

The `in' operator was introduced in JavaScript 1.5 (Mozilla/5.0 rv:0.6,
November 2000), JScript 5.5 (IE 5.5, July 1999) [1], and ECMAScript
Edition 3 (December 1999).

The `hasOwnProperty' method was introduced in JavaScript 1.5, JScript 5.5,
and ECMAScript Edition 3.

Since the current major version of IE is 6.0, that would mean you consider
its previous major version, IE 5.0, historic already, even though it is
still used. I take that as another proof that what you post should be
handled with extreme care.
P.S.
The "in" operator checks if an object has a property named property. It
also checks the object's prototype to see if the property is part of
the prototype chain.


The operator simply uses the prototype chain, by calling the internal
GetValue() method (ES3 Final, 8.7.1) which calls the internal [[Get]]
method (8.6.2.1) which calls the [[Get]] method of [[Prototype]] if it
is not `null' (steps 4 and 5), _up to its end_ (including the prototype
of the prototype aso.). It does not check only the object's prototype
explicitly as that would not be sufficient.
PointedEars
___________
[1] The JScript and JScript.NET References say it was introduced in JScript
1.0 already, that would mean IE 3.0 (August 1996). However, I find that
hard to believe and think that is an error, since a) ECMAScript Ed. 3
was not published yet and b) it also says that `for (... in ...)' was
not supported before JScript 5.5 (IE 5.5). I would appreciate it if
someone could provide reliable test results to back up either claim.
Feb 9 '06 #5
VK

Thomas 'PointedEars' Lahn wrote:
VK wrote:
('property' in someObject) is not intended for features test - though
it can be used and it is used this way (when the support for
prehistoric browsers is not a requirement).
So your history begins not long before 2000 CE? That would explain some
of your misconceptions, although not all of them.


And what your history begins with? 1995? The oldest IE currently
supported by Microsoft is IE 5.5 SP2. This is the oldest version one
can hold by claming "corporate demands". Any older versions are being
kept by few individuals for reasons which are out of my interest.
If NN4, IE4, Opera 6 etc. users still want to enjoy the modern web w/o
_free_ updates then they are welcome to join into "Old Browsers User
Society" and donate into special fund which would pay to Yahoo, MSN,
myself and any other developers for extra solutions for outdated
browsers. But I'm affraid that they are willing to spend their money
for my extra efforts as much as I willing to spend extra efforts for
them for free.

I'm supporting JavaScript 1.5 and higher, JScript 5.6 plus a bunch of
half-a** done DOM implementations made over the last few years. That's
already 50% volunteer work not covered by my payroll.

And I need to sit on my spare day for free because some John Doe
bothers to spend 10 min to update his Opera 3.0 to Opera 8.51 ? Kiss
my..
JavaScript 1.0 and ECMAScript implementations (e.g. JavaScript 1.1+, JScript
1.0+) have always been languages that used prototype-based inheritance.
What inheritance?!? JavaScript that did not have any inheritance - not
prototype based, not classical. You simply cannot create anything -
only declare variables and add properties to window object. Plus Math
and Date objects.
The `in' operator was introduced in JavaScript 1.5 (Mozilla/5.0 rv:0.6,
November 2000), JScript 5.5 (IE 5.5, July 1999) [1], and ECMAScript
Edition 3 (December 1999).

The `hasOwnProperty' method was introduced in JavaScript 1.5, JScript 5.5,
and ECMAScript Edition 3.
Yes, exactly because developers got all tools for fully functional
inheritance and they needed (or at least it was thought so) traking
tools for inherited members.
Since the current major version of IE is 6.0, that would mean you consider
its previous major version, IE 5.0, historic already, even though it is
still used.
See above
The operator simply uses the prototype chain, by calling the internal
GetValue() method (ES3 Final, 8.7.1) which calls the internal [[Get]]
method (8.6.2.1) which calls the [[Get]] method of [[Prototype]] if it
is not `null' (steps 4 and 5), _up to its end_ (including the prototype
of the prototype aso.). It does not check only the object's prototype
explicitly as that would not be sufficient.


If you call it "simply" then so be it :-)
You can forward this explanation to Microsoft, because they seem in the
dark how does their operator work.

Feb 10 '06 #6

Thomas 'PointedEars' Lahn napisal(a):
[1] The JScript and JScript.NET References say it was introduced in JScript
1.0 already, that would mean IE 3.0 (August 1996). However, I find that
hard to believe and think that is an error, since a) ECMAScript Ed. 3
was not published yet and b) it also says that `for (... in ...)' was
not supported before JScript 5.5 (IE 5.5). I would appreciate it if
someone could provide reliable test results to back up either claim. From my past posts i have done some testing in 'in' operator and others

(which revealed some features of JavaScript 1.2 (1.3) / JScript
3.0/IE4):
- for(... in ...) construct is supported since JavaScript 1.2 /
JScript 3.0/IE4, but expressions like [string] in objRef (resulting of
Boolean value) are not supported since IE5.5/JScript 5.5, JavaScript
1.5(?);

others:

- strict equality operators === and !== are supported since JavaScript
1.3 / JScript 3/IE4
- anonymous and named function expressions are supported since
JavaScript 1.3 / JScript 3(?)/IE4 (althought they were not included in
ECMAScript Ed. 1);
- switch/case/default, delete, do/while, labeled continue and labeled
break with array/object initializer ( [ ] / { } ) are supported since
JavaScript 1.2 / JScript 3/IE4 (althought they were not included in
ECMAScript Ed. 1);
- nesting functions inside functions is supported since JavaScript 1.2
/ JScript 3(?)/IE4 (althought they were not included in ECMAScript Ed.
1);

(?) - not 100% sure, maybe someone more knowlegable will correct this;
(since features mentioned above are widely used when creating scripts,
the baseline for those scripts are IE 4 / NN 4(.06)).

B.R.
Luke.

Feb 10 '06 #7

Luke Matuszewski napisal(a):
[...] delete [...]

(were in ECMAScript Ed. 1);

As a final note, ECMAScript Ed. 2 is only a rewriting of ECMAScript Ed.
1 to comply to ISO/IEC 16262 standard (so no new features were added
till ECMAScript Ed. 3).

B.R.
Luke Matuszewski

Feb 10 '06 #8
VK

Luke Matuszewski wrote:
- for(... in ...) construct is supported since JavaScript 1.2 /
JScript 3.0/IE4, but expressions like [string] in objRef (resulting of
Boolean value) are not supported since IE5.5/JScript 5.5, JavaScript
1.5(?);


There are:

for (...in...) {...} Statement

in Operator // if ('something' in something)

for (...in...) *statement* is supported "since forever". It means that
when the first sketchy descriptions of JavaScript appeared (before any
ECMA and versioning), for (...in...) statement was already there in the
same form as it is now. Possibly it was not presented in the fist
drafts of LiveScript - I did not work with it.

in *operator* has been introduced in JScript 5.0 / JavaScript 1.5

While preparing the documentation for JScript 5.6, a typo had been made
so versions are being switched:
for (...in...) *statement* is marked as supported since JScript 5.0 and
in *operator* as supported since JScript 1.0

Switch the versions and you will get the right picture.

Unfortunately this typo was reproduced in a number of places as I can
tell. You are welcome to report it to all involved organizations under
your name if you want to. Overall this documentation bug wouldn't be
discovered without your post.

Feb 10 '06 #9
VK wrote:
Luke Matuszewski wrote:
- for(... in ...) construct is supported since JavaScript 1.2 /
JScript 3.0/IE4, but expressions like [string] in objRef (resulting of
Boolean value) are not supported since IE5.5/JScript 5.5, JavaScript
1.5(?);


There are:

for (...in...) {...} Statement

in Operator // if ('something' in something)

for (...in...) *statement* is supported "since forever". It means that
when the first sketchy descriptions of JavaScript appeared (before any
ECMA and versioning), for (...in...) statement was already there in
the same form as it is now. Possibly it was not presented in the fist
drafts of LiveScript - I did not work with it.

in *operator* has been introduced in JScript 5.0 / JavaScript 1.5
[...]
Switch the versions and you will get the right picture.
[...]


That is not quite correct.

The Guides for JavaScript 1.0 and 1.1, the JavaScript 1.2 Reference, and
the Core JavaScript 1.3 to 1.5 References say the same about the `for (...
in ...)' statement ("Implemented in: JavaScript 1.0, NES 2.0, ECMA[Script]
[Edition]: ECMA-262 [June 1997]").

There is no mention of a standalone `in' operator before Core JavaScript
1.4.

Since we know that Microsoft JScript 1.0 (August 1996) was nothing more
than an enhanced copy of JavaScript 1.0/1.1 (March/August 1996), there is
good reason to believe that the `for (... in ...)' statement was already
supported in that first JScript version indeed. It is also conclusive that
after Netscape introduced the standalone `in' operator in JavaScript 1.4
(1998/1999; implemented server-side only), later specified in ECMAScript
Edition 3 (December 1999), Microsoft implemented it in JScript 5.0 (March
1999; IE 5.0). (I will modify my JS/ECMAScript Support Matrix accordingly.)

That does not make your initial statement in this thread reasonable, though.
PointedEars
Feb 10 '06 #10

Thomas 'PointedEars' Lahn napisal(a):
standalone `in' operator [...]
Microsoft implemented it in JScript 5.0


You are wrong. The standalone 'in' operator was implemented in W. IE
5.5+ (it was not implemeneted in JScript 5.1/W.IE5 SP2). Here is a test
case i used:

<script type="text/javascript">
var obj = {};
obj.prop = "sample";
if("prop" in obj) alert("yes"); // alerts "yes" only on W.IE5.5 and
above, in W.IE 5 yelds error
</script>

, on Standalone Windows Internet Explorers from:
<URL:downloads.skyzyx.com/>

W.IE - Windows Internet Explorer (there is also Mac Internet Explorer,
since 5.1 it has ECMAScript Ed. 3 compilance).

B.R.
Luke Matuszewski

Feb 10 '06 #11

Furthermore there is a typeof operator which is supported since
JavaScript 1.1 and JScript 2.0, which works almost like 'in' operator
(the only case it 'fails' is when property of object exists and have
undefined value). Here is an example:

var obj = new Object();
obj.prop = "string 1";

if(typeof(obj.prop) != 'undefined') {
alert("obj.prop exists"); //yelds
}

if("prop" in obj) {
alert("obj.prop exists"); //yelds
}

obj.prop = window.window1234567890;

if(typeof(obj.prop) != 'undefined') { //actually obj.prop exists and
has a value undefined...
alert("obj.prop exists"); // NOT yelds
}

if("prop" in obj) {
alert("obj.prop exists"); //yelds
}

Generally typeof is more supported, and i think suggested way to detect
the existence of property.

B.R.
Luke Matuszewski.

Feb 10 '06 #12
Luke Matuszewski wrote:
Thomas 'PointedEars' Lahn napisal(a):
standalone `in' operator [...]
Microsoft implemented it in JScript 5.0
You are wrong.


You want to learn to quote. NOW.

I have not stated that it is so. I have said that there is reason to
believe that VK is right regarding the version mixup in the MSDN Library
documentation. I cannot be proven to have been wrong with the above
because I have never said it.
The standalone 'in' operator was implemented in W. IE
5.5+ (it was not implemeneted in JScript 5.1/W.IE5 SP2).


Fair enough, that still fits the pattern of JScript implementation after
JavaScript, and makes VK's initial argument that `in' could be used when
"prehistoric browser" support was not required even less reasonable.
PointedEars
Feb 10 '06 #13
Luke Matuszewski wrote:
Furthermore there is a typeof operator which is supported since
JavaScript 1.1 and JScript 2.0, which works almost like 'in' operator
(the only case it 'fails' is when property of object exists and have
undefined value). [...]
Why the quotes? It definitely fails in this case or when the object
inherits the property through the prototype chain with this particular
value.
Generally typeof is more supported, and i think suggested way to detect
the existence of property.


We had this argument before, remember? `typeof' cannot be used to detect
the existence of a property reliably. However, there is no better way with
host objects, and it is usually sufficient.
PointedEars
Feb 10 '06 #14
Luke Matuszewski wrote:
Thomas 'PointedEars' Lahn wrote:
You want to learn to quote. NOW.


What is wrong with my quotes (please describe if you have some time)
? (ps my intention was not to hurt your pride publicly or something
like that, obviously it seems it is your character is too impetuous).

B.R.
Luke Matuszewski

Feb 10 '06 #15
Luke Matuszewski wrote:
Luke Matuszewski wrote:
Thomas 'PointedEars' Lahn wrote:
You want to learn to quote. NOW.


What is wrong with my quotes (please describe if you have some time)
?


First you destroyed the context of my statement, then
you said I was wrong, referring only to what was left.
PointedEars
Feb 10 '06 #16
VK

Thomas 'PointedEars' Lahn wrote:
The Guides for JavaScript 1.0 and 1.1, the JavaScript 1.2 Reference, and
the Core JavaScript 1.3 to 1.5 References say the same about the `for (...
in ...)' statement ("Implemented in: JavaScript 1.0, NES 2.0, ECMA[Script]
[Edition]: ECMA-262 [June 1997]").

There is no mention of a standalone `in' operator before Core JavaScript
1.4.
JavaScript 1.4 was a version that "never became". It was a version to
use for client-server transactions but no one transaction was ever done
using it (besides the test runs within the Netscape office). The war
was lost and new masters (AOL) were not interested in internees' side
researches.
Since we know that Microsoft JScript 1.0 (August 1996) was nothing more
than an enhanced copy of JavaScript 1.0/1.1 (March/August 1996), there is
good reason to believe that the `for (... in ...)' statement was already
supported in that first JScript version indeed. It is also conclusive that
after Netscape introduced the standalone `in' operator in JavaScript 1.4
(1998/1999; implemented server-side only), later specified in ECMAScript
Edition 3 (December 1999), Microsoft implemented it in JScript 5.0 (March
1999; IE 5.0). (I will modify my JS/ECMAScript Support Matrix accordingly.)

That does not make your initial statement in this thread reasonable, though.


That places things in the right order: for (... in ... ) statement was
implemented since JS ever was, (...in...) operator is implemented since
JS 5.0 (IE) / 1.5 (NN=>FF)

Feb 10 '06 #17

VK napisal(a):
That places things in the right order: for (... in ... ) statement was
implemented since JS ever was, (...in...) operator is implemented since
JS 5.0 (IE) / 1.5 (NN=>FF)


Since JScript 5.5 (IE5.5) / JavaScript 1.5 (NN6, all FF, all Mozila) /
Opera 6 / Safari 1.2. (tests provied in prevous posts, and tested on
Windows Internet Explorer from <URL:downloads.skyzyx.com>).

Feb 10 '06 #18
VK

Luke Matuszewski wrote:
Since JScript 5.5 (IE5.5) / JavaScript 1.5 (NN6, all FF, all Mozila) /
Opera 6 / Safari 1.2. (tests provied in prevous posts, and tested on
Windows Internet Explorer from <URL:downloads.skyzyx.com>).


Correct for IE: JScript 5.0 (Internet Explorer 5.0) supports statements

if ('something' in something)
for Windows

It is not clear for Mac platforms

Feb 10 '06 #19

VK napisal(a):
Luke Matuszewski wrote:
Since JScript 5.5 (IE5.5) / JavaScript 1.5 (NN6, all FF, all Mozila) /
Opera 6 / Safari 1.2. (tests provied in prevous posts, and tested on
Windows Internet Explorer from <URL:downloads.skyzyx.com>).
Correct for IE: JScript 5.0 (Internet Explorer 5.0) supports statements

if ('something' in something)
for Windows


Then i have buggy Windows Internet Explorer implementations and site
<URL:downloads.skyzyx.com> provided buggy/modified standalone microsoft
internet explorers which in those versions they removed 'in' standalone
operator support from theirs Internet Explorer 5 SP2 (JScript
5.1.0.5010) (my tests provided in this post runed on WIE 3 to WIE 6,
and only WIE5.5 and above passed it without errors). On W. IE 5 there
was an error:

<quote>
Line: 16
Char: 11
Error: Expected character ')'
Code: 0
URL: [file://C:\Devel\Apache2\www\funcexpr.htm]
<quote>

which was (in my test htm file):
if("prop" in obj) {

^
|- is line 16, char 11...

Any comments ?

B.R.
Luke Matuszewski

Feb 10 '06 #20
VK wrote:
Thomas 'PointedEars' Lahn wrote:
The Guides for JavaScript 1.0 and 1.1, the JavaScript 1.2 Reference, and
the Core JavaScript 1.3 to 1.5 References say the same about the `for
(... in ...)' statement ("Implemented in: JavaScript 1.0, NES 2.0,
ECMA[Script]
[Edition]: ECMA-262 [June 1997]").

There is no mention of a standalone `in' operator before Core JavaScript
1.4.
JavaScript 1.4 was a version that "never became".
It was a version to use for client-server transactions but no one
transaction was ever done using it (besides the test runs within the
Netscape office). The war was lost and new masters (AOL) were not
interested in internees' side researches.


Utter nonsense. I have already said that JavaScript 1.4 (1998/1999) is
implemented server-side only. The server that supported it was Netscape
Enterprise Server 4.0. What is true only is that AOL/TW acquired Netscape
Comm. on November 24, 1998, which led to the formation of iPlanet Inc.,
a corporation jointly owned by Sun Microsystems, Inc. and AOL, and the
release of NES 4.1 as iPlanet Web Server 4.1. After AOL finally sold the
remaining portion of its interest in iPlanet to Sun, the brand changed
again to Sun ONE Web Server to what is now called Sun Java (Enterprise)
System (JES) Web Server. Sun ONE Server still supported Server-Side
JavaScript 1.4, and since the Java System Web Server incorporates its
features, it is likely that it also supports Server-Side JavaScript 1.4.
There are also other Web servers that support SSJS, most certainly
version 1.4.
[...]
That does not make your initial statement in this thread reasonable,
though.


You overlooked that.
That places things in the right order: for (... in ... ) statement was
implemented since JS ever was, (...in...) operator is implemented since
JS 5.0 (IE) / 1.5 (NN=>FF)


Apparently your statement does not hold water for the standalone `in'
operator. The last part of your sentence is worded confusingly, BTW.
PointedEars
Feb 10 '06 #21

Thomas 'PointedEars' Lahn napisal(a):
I have already said that JavaScript 1.4 (1998/1999) is
implemented server-side only.


Same as JScript 4.0, which was implemented only in commercial
product (not 100% sure but in Visual InterDev / Visual Studio 6.0).

B.R.
Luke Matuszewski

Feb 10 '06 #22
VK

Luke Matuszewski wrote:
VK napisal(a):
Luke Matuszewski wrote:
Since JScript 5.5 (IE5.5) / JavaScript 1.5 (NN6, all FF, all Mozila) /
Opera 6 / Safari 1.2. (tests provied in prevous posts, and tested on
Windows Internet Explorer from <URL:downloads.skyzyx.com>).


Correct for IE: JScript 5.0 (Internet Explorer 5.0) supports statements

if ('something' in something)
for Windows


Then i have buggy Windows Internet Explorer implementations and site
<URL:downloads.skyzyx.com> provided buggy/modified standalone microsoft
internet explorers which in those versions they removed 'in' standalone
operator support from theirs Internet Explorer 5 SP2 (JScript
5.1.0.5010) (my tests provided in this post runed on WIE 3 to WIE 6,
and only WIE5.5 and above passed it without errors). On W. IE 5 there
was an error:

<quote>
Line: 16
Char: 11
Error: Expected character ')'
Code: 0
URL: [file://C:\Devel\Apache2\www\funcexpr.htm]
<quote>

which was (in my test htm file):
if("prop" in obj) {

^
|- is line 16, char 11...

Any comments ?


Another bug in MSDN docs then. I must admit that IE 5.x below IE 5.5 is
out of my experience. From IE 4 I moved on IE 5.5 right away.

So the final corrected variant would be:

for (... in...) Statement supported since JavaScript 1.0 / JScript 1.0
in Operator supported since JavaScript 1.5 / JScript 5.5

1) JavaScript versions are going by the Netscape > Mozilla Foundation
table
JavaScript 1.4 is skipped as it is not really correct to talk about a
support of something in something that never was used. It's IMHO, but
you may still mention JavaScript 1.4 for formal correctness.

2) JScript versions are going by the Microsoft table.

In this form the decumentation bug description is shiny perfect and
ready to be reported if you want to :-)

Feb 11 '06 #23

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: christian9997 | last post by:
Hi We have started off using a $_GET parameter to keep track of the user's browser: We detect what browser the visitor is using when he first arrives on our website then we do a redirect to...
6
by: Amir Hardon | last post by:
I am dynamically adding rows to a table, and each row have a button which removes it. I have successfully implemented this for mozilla but I'm having troubles with IE, here is how I did it: ...
12
by: Kepler | last post by:
How do you get the height of the client browser in IE? Both document.body.clientHeight and document.body.offsetHeight return the height of the document. If the page is long and there's a vertical...
5
by: Kim Forbes | last post by:
Hi, I realize my first problem is that I'm using browser detection and not feature detection. Maybe someone can help me understand feature detection. This script works in every browser that I...
1
by: tabert | last post by:
I want to use JavaScript when a button is clicked to show and hide a SPAN or DIV. This works in both IE and Netscape, but what I'd like to happen is for there to be no white space where the hidden...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
6
by: sylcheung | last post by:
Hi, How can I be notified when the document load is complet in JavaScript? I am referring to the whold document load is complete, mean all images/external files/frame/iframes have been loaded. ...
1
by: Jake Pearson | last post by:
Hi, I just upgraded to VS 2005 from 2003, and builds have become much slower (like 10 times worse). I have noticed 2 things that I can not explain: 1. Everytime I build, I get a message on my...
5
by: Peter Michaux | last post by:
Hi, I just did a bunch of testing and was surprised with the results. If anyone doesn't know this stuff here is what I found about event.clientX. The event.clientX property in Safari is in...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.