473,480 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Regarding self

Regarding 'self' :-

if (self)
document.write( "self<br>");

if (self === window)
document.write( "self === window<br>");
else if (self == window)
document.write( "self == window<br>");

if (self === document)
document.write( "self === document<br>");
else if (self == document)
document.write( "self == document<br>");

if (window === document)
document.write( "window === document<br>");
else if (window == document)
document.write( "window == document<br>");

IE :-
self
self == window
self == document
window == document

FF, Opera, Safari :-
self
self === window

Aaron

Aug 19 '08 #1
3 1333
"Aaron Gray" <an********@gmail.comwrote in message
news:6g************@mid.individual.net...
Regarding 'self' :-
Here's alink to the 'self' test page :-

http://www.aarongray.org/Test/JavaScript/self-test.html

Aaron

Aug 19 '08 #2
"Aaron Gray" <an********@gmail.comwrote in message
news:6g************@mid.individual.net...
Regarding 'self' :-
So why use 'self' at all ?

Why not just use 'window' instead for FF, Opera, and Safari ?

Are there some browsers that only support 'innerHeight/Width' on self ?

But then 'document.body.clientHeight/Width' give the same values as
'window.innerHeight/Width' so why use those.

I have only been testing this on the latest versions of the browsers, so I
maybe overlooking older incompatibilities. So if anyone can shed more light
on older browsers behaviour with/without this test page I would be most
thankful

Aaron

Aug 19 '08 #3
"Aaron Gray" <an********@gmail.comwrote in message
news:6g************@mid.individual.net...
But then 'document.body.clientHeight/Width' give the same values as
'window.innerHeight/Width' so why use those.
I have found 'document.body.clientHeight/Width' may not be very useful
compared to 'window.innerHeight/Width' as on Safari 2.0.4 it is minus
document.body.margin'. And on Konqueror clientHeight/Width is much smaller
than the actual client area.

Aaron

Aug 19 '08 #4

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

Similar topics

1
3857
by: Andrew Robert | last post by:
Hi everyone, Could someone help explain what I am doing wrong in this code block? This code block is an excerpt from a larger file that receives transmitted files via IBM WebSphere MQSeries...
2
1254
by: vajratkarviraj | last post by:
hey all... im using python 2.5 with Tkinter (if any1 wants 2 know)... earlier i had queried about how to make a matrix in this forums and i got an excellent reply in which the code for making a 2d...
2
1660
by: gaurav kashyap | last post by:
Dear all, I have a server program that listens to a particular port and a number of client programs that connect to the server. Now i want to put some data in form of python list in main...
2
1571
by: koti688 | last post by:
I have two files like below. 1st file : mail.pl #!/usr/bin/perl use DBD::mysql; use DBI; use Utils::DBClass; $object = new DBClass( "perltest", "localhost", 3306, "root", "sierra");
0
7041
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
7044
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7084
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
6929
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5337
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,...
1
4779
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
181
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.