![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.javascript archiveRe: 'in' operator and feature detection technique...
From: Luke Matuszewski <matuszewski.lukasz@gmail.com>
Date: Thu Feb 09 2006 - 17:31:39 CET
Luke Matuszewski napisal(a):
, which will not work if document has a write property and it has null
> if("write" in document) {
, results true if document has write property even if it is null or
I do not see other reasons for using 'in' operator (detecting property
var ob = { prop: " [ property value ] " };
if("prop" in ob) {
ob.prop = null;
if(ob.prop) {
if("prop" in ob) {
ob.prop = window.window1234567890; /* ob.prop == undefined */
if(ob.prop) {
if("prop" in ob) {
B.R.
|