Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Scroll position detection

31 views
Skip to first unread message

Tuxedo

unread,
May 25, 2013, 6:08:28 AM5/25/13
to
I've used documentElement.scrollTop to identify page scroll position for
returning to previous page links.

However, I only just realised it doesn't work in Chrome and perhaps
therefore likely some other browers too.

Instead, I found body.scrollTop works in Chrome but doesn't work in FF.

While <!DOCTYPE html> is in use, would the following cover most situations
where scroll position can be identified?

if(document.documentElement.scrollTop){
y = document.documentElement.scrollTop;
}
if(document.body.scrollTop){
y = document.body.scrollTop;
}

Many thanks,
Tuxedo

Evertjan.

unread,
May 25, 2013, 7:12:30 AM5/25/13
to
Tuxedo wrote on 25 mei 2013 in comp.lang.javascript:

> if(document.documentElement.scrollTop){
> y = document.documentElement.scrollTop;
>}
> if(document.body.scrollTop){
> y = document.body.scrollTop;
>}
>

Try this:

<body onclick='alert
(document.documentElement.scrollTop||document.body.scrollTop)'>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Tuxedo

unread,
May 25, 2013, 10:02:00 AM5/25/13
to
Evertjan. wrote:

> Tuxedo wrote on 25 mei 2013 in comp.lang.javascript:
>
> > if(document.documentElement.scrollTop){
> > y = document.documentElement.scrollTop;
> >}
> > if(document.body.scrollTop){
> > y = document.body.scrollTop;
> >}
> >
>
> Try this:
>
> <body onclick='alert
> (document.documentElement.scrollTop||document.body.scrollTop)'>
>

Thanks for the short version, it works fine.

Tuxedo

Joao Rodrigues

unread,
May 27, 2013, 12:07:41 AM5/27/13
to
On 25/05/2013 08:12, Evertjan. wrote:
> Tuxedo wrote on 25 mei 2013 in comp.lang.javascript:
>
>> if(document.documentElement.scrollTop){
>> y = document.documentElement.scrollTop;
>> }
>> if(document.body.scrollTop){
>> y = document.body.scrollTop;
>> }
>>
>
> Try this:
>
> <body onclick='alert
> (document.documentElement.scrollTop||document.body.scrollTop)'>
>

The W3C standard is pageYOffset:
<http://www.w3.org/TR/cssom-view/#dom-window-pageyoffset>

Also see:
<http://www.quirksmode.org/dom/w3c_cssom.html>

and
<https://developer.mozilla.org/en-US/docs/Web/API/window.scrollY>

So, nowadays we need to test for pageYOffset before testing for the
proprietary scrollTop. E.g

function getVerticalScroll() {
var yScroll, doc = document;
if (window.pageYOffset) {
// IE9+, FF3+, Safari 4+, Chrome 4+, Opera 10+
yScroll = window.pageYOffset;
} else if (doc.documentElement && doc.documentElement.scrollTop) {
// IE8 and older browsers in standards-compliant mode (strict mode).
yScroll = doc.documentElement.scrollTop;
} else if (doc.body) {
// IE in quirks mode and a last attempt for the other browsers.
yScroll = doc.body.scrollTop;
}
return yScroll;
}


--
Joao Rodrigues

Thomas 'PointedEars' Lahn

unread,
May 27, 2013, 5:48:36 AM5/27/13
to
Joao Rodrigues wrote:

> On 25/05/2013 08:12, Evertjan. wrote:
>> Tuxedo wrote on 25 mei 2013 in comp.lang.javascript:
>>> if(document.documentElement.scrollTop){
>>> y = document.documentElement.scrollTop;
>>> }
>>> if(document.body.scrollTop){
>>> y = document.body.scrollTop;
>>> }
>>>
>>
>> Try this:
>>
>> <body onclick='alert
>> (document.documentElement.scrollTop||document.body.scrollTop)'>
>>
>
> The W3C standard is pageYOffset:
> <http://www.w3.org/TR/cssom-view/#dom-window-pageyoffset>

When will you ever learn?

| CSSOM View Module
|
| W3C Working Draft 4 August 2011
|
| […]
| Publication as a Working Draft does not imply endorsement by the W3C
| Membership. This is a draft document and may be updated, replaced or
| obsoleted by other documents at any time. It is inappropriate to cite this
| document as other than work in progress.

--
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

Denis McMahon

unread,
May 27, 2013, 6:16:43 AM5/27/13
to
On Mon, 27 May 2013 01:07:41 -0300, Joao Rodrigues wrote:

> The W3C standard is pageYOffset:
> <http://www.w3.org/TR/cssom-view/#dom-window-pageyoffset>
>
> Also see:
> <http://www.quirksmode.org/dom/w3c_cssom.html>
>
> and <https://developer.mozilla.org/en-US/docs/Web/API/window.scrollY>
>
> So, nowadays we need to test for pageYOffset before testing for the
> proprietary scrollTop. E.g

Hmm, tried that, ff 21 under linux ubuntu 12.04.2 lts, and none of them
seem to give any data.

function xyPos() {
var str = "";
if ( window.pageXOffset || window.pageYOffset )
str += "[ " +
window.pageXOffset +
", " +
window.pageYOffset +
" ] from window.pageX/YOffset\n";
if ( document.documentElement &&
( document.documentElement.scrollLeft ||
document.documentElement.scrollTop ) )
str += "[ " +
document.documentElement.scrollLeft +
", " +
document.documentElement.scrollTop +
" ] from document.documentElement.scrollLeft/Top\n";
if ( document.body &&
( document.body.scrollLeft ||
document.body.scrollTop ) )
str += "[ " +
document.body.scrollLeft +
", " +
document.body.scrollTop +
" ] from document.body.scrollLeft/Top\n";
if ( str == "" )
str = "no xy data found";
alert( str );
}

--
Denis McMahon, denismf...@gmail.com

Joao Rodrigues

unread,
May 27, 2013, 8:33:54 AM5/27/13
to
On 27/05/2013 06:48, Thomas 'PointedEars' Lahn wrote:
> Joao Rodrigues wrote:
>
>> The W3C standard is pageYOffset:
>> <http://www.w3.org/TR/cssom-view/#dom-window-pageyoffset>
>
> When will you ever learn?
>
> | CSSOM View Module
> |
> | W3C Working Draft 4 August 2011
> |
> | […]
> | Publication as a Working Draft does not imply endorsement by the W3C
> | Membership. This is a draft document and may be updated, replaced or
> | obsoleted by other documents at any time. It is inappropriate to cite this
> | document as other than work in progress.
>
>

So?

--
Joao Rodrigues

Thomas 'PointedEars' Lahn

unread,
May 27, 2013, 8:39:58 AM5/27/13
to
Contrary to what you claimed, the W3C standard is _not_ pageYOffset because
*there* *is* *no* *W3C* *standard* regarding such properties (yet). Also,
that this *Working* *Draft* has not been updated for almost two years does
not bode well for it ever becoming a W3C standard.

Denis McMahon

unread,
May 27, 2013, 8:37:20 AM5/27/13
to
On Mon, 27 May 2013 09:33:54 -0300, Joao Rodrigues wrote:

> On 27/05/2013 06:48, Thomas 'PointedEars' Lahn wrote:
>> Joao Rodrigues wrote:

>>> The W3C standard is pageYOffset:

>> When will you ever learn?

>> | W3C Working Draft 4 August 2011 |

> So?

Do you not understand the difference between a standard and a working
draft?

Also, you made me agree with pointy head. That is unforgiveable!

--
Denis McMahon, denismf...@gmail.com

Joao Rodrigues

unread,
May 27, 2013, 8:45:45 AM5/27/13
to
Hi,
Strange, I've been using pageYOffset since Feb 2011 and haven't found
problems in FF since then. Maybe you haven't scrolled the page downwards
before executing the code...

Cheers,
Joao Rodrigues

Joao Rodrigues

unread,
May 27, 2013, 8:57:40 AM5/27/13
to
On 27/05/2013 09:37, Denis McMahon wrote:
> On Mon, 27 May 2013 09:33:54 -0300, Joao Rodrigues wrote:
>
>> On 27/05/2013 06:48, Thomas 'PointedEars' Lahn wrote:
>>> Joao Rodrigues wrote:
>
>>>> The W3C standard is pageYOffset:
>
>>> When will you ever learn?
>
>>> | W3C Working Draft 4 August 2011 |
>
>> So?
>
> Do you not understand the difference between a standard and a working
> draft?

Of course, I do! The fact is *all* browsers (even IE9 / 10 !!!) are
compatible with pageY[X]Offset nowadays. So there's no plausible reason
to not use these properties nowadays.

>
> Also, you made me agree with pointy head. That is unforgiveable!

LOL.


--
Joao Rodrigues

Joao Rodrigues

unread,
May 27, 2013, 10:33:41 AM5/27/13
to
On 27/05/2013 09:39, Thomas 'PointedEars' Lahn wrote:
> Joao Rodrigues wrote:
>
>> On 27/05/2013 06:48, Thomas 'PointedEars' Lahn wrote:
>>> Joao Rodrigues wrote:
>>>> The W3C standard is pageYOffset:
>>>> <http://www.w3.org/TR/cssom-view/#dom-window-pageyoffset>
>>>
>>> When will you ever learn?
>>>
>>> | CSSOM View Module
>>> |
>>> | W3C Working Draft 4 August 2011
>>> |
>>> | […]
>>> | Publication as a Working Draft does not imply endorsement by the W3C
>>> | Membership. This is a draft document and may be updated, replaced or
>>> | obsoleted by other documents at any time. It is inappropriate to cite
>>> | this document as other than work in progress.
>>
>> So?
>
> Contrary to what you claimed, the W3C standard is _not_ pageYOffset because
> *there* *is* *no* *W3C* *standard* regarding such properties (yet). Also,
> that this *Working* *Draft* has not been updated for almost two years does
> not bode well for it ever becoming a W3C standard.
>

Thomas, you are a very smart guy and you need not use fallacies to make
believe you are always correct. Almost everything in W3C site is a
Working Draft or a Recommendation:
<http://www.w3.org/TR/#w3c_all>


--
Joao Rodrigues

Thomas 'PointedEars' Lahn

unread,
May 27, 2013, 10:42:33 AM5/27/13
to
The fallacies are yours. A Working Draft and anything else with a status
*other* than Recommendation is _not_ (yet) a W3C standard:

<http://www.w3.org/standards/about.html> p.

You have been told this several times before. Yet you continue to claim the
opposite of the truth.

Thomas 'PointedEars' Lahn

unread,
May 27, 2013, 10:45:26 AM5/27/13
to
Joao Rodrigues wrote:

> On 27/05/2013 09:37, Denis McMahon wrote:
>> On Mon, 27 May 2013 09:33:54 -0300, Joao Rodrigues wrote:
>>> On 27/05/2013 06:48, Thomas 'PointedEars' Lahn wrote:
>>>> Joao Rodrigues wrote:
>>>>> The W3C standard is pageYOffset:
>>>>
>>>> When will you ever learn?
>>>>
>>>> | W3C Working Draft 4 August 2011 |
>>>
>>> So?
>>
>> Do you not understand the difference between a standard and a working
>> draft?
>
> Of course, I do! The fact is *all* browsers (even IE9 / 10 !!!) are
> compatible with pageY[X]Offset nowadays. So there's no plausible reason
> to not use these properties nowadays.

Red herring. You have claimed it would be “the W3C standard”; it is not.

Joao Rodrigues

unread,
May 27, 2013, 10:58:19 AM5/27/13
to
On 27/05/2013 11:45, Thomas 'PointedEars' Lahn wrote:
> Joao Rodrigues wrote:
>
>> On 27/05/2013 09:37, Denis McMahon wrote:
>>> On Mon, 27 May 2013 09:33:54 -0300, Joao Rodrigues wrote:
>>>> On 27/05/2013 06:48, Thomas 'PointedEars' Lahn wrote:
>>>>> Joao Rodrigues wrote:
>>>>>> The W3C standard is pageYOffset:
>>>>>
>>>>> When will you ever learn?
>>>>>
>>>>> | W3C Working Draft 4 August 2011 |
>>>>
>>>> So?
>>>
>>> Do you not understand the difference between a standard and a working
>>> draft?
>>
>> Of course, I do! The fact is *all* browsers (even IE9 / 10 !!!) are
>> compatible with pageY[X]Offset nowadays. So there's no plausible reason
>> to not use these properties nowadays.
>
> Red herring. You have claimed it would be “the W3C standard”; it is not.
>

You insist in answering a fallacy with another. And you are nit-picking,
as you usually do, on some trivial aspect of one's post instead of
giving a real solution to the OP. I don't know what you do for living,
but it is obvious that you have too much time in your hands to spend all
day long trying to prove you are always right. Do your boss know about it?

Okay, only W3C's Recommendations are the "web standards". But tell me:
is there any reason to not test for pageYOffset support first in the
OP's code?

--
Joao Rodrigues

Thomas 'PointedEars' Lahn

unread,
May 27, 2013, 11:27:24 AM5/27/13
to
Joao Rodrigues wrote:

> On 27/05/2013 11:45, Thomas 'PointedEars' Lahn wrote:
>> Joao Rodrigues wrote:
>>> On 27/05/2013 09:37, Denis McMahon wrote:
>>>> On Mon, 27 May 2013 09:33:54 -0300, Joao Rodrigues wrote:
>>>>> On 27/05/2013 06:48, Thomas 'PointedEars' Lahn wrote:
>>>>>> Joao Rodrigues wrote:
>>>>>>> The W3C standard is pageYOffset:
>>>>>>
>>>>>> When will you ever learn?
>>>>>>
>>>>>> | W3C Working Draft 4 August 2011 |
>>>>>
>>>>> So?
>>>>
>>>> Do you not understand the difference between a standard and a working
>>>> draft?
>>>
>>> Of course, I do! The fact is *all* browsers (even IE9 / 10 !!!) are
>>> compatible with pageY[X]Offset nowadays. So there's no plausible reason
>>> to not use these properties nowadays.
>>
>> Red herring. You have claimed it would be “the W3C standard”; it is not.
>
> You insist in answering a fallacy with another.

There is no fallacy on my part; you claimed something that I have proven
wrong. You should learn to live with that, and in the future be slower to
make claims that you are not able to substantiate.

> And you are nit-picking,

No, I have made your false premise obvious (to you). This is important
because /ex falso quodlibet/ (“from a false statement *anything* – right
*and* wrong – can be deduced”) applies.

> as you usually do,

/Argumentum ad hominem/, and /ad populum/. I would strongly suggest instead
that you go quiet when you are out of sound arguments.

> on some trivial aspect

It was you who claimed that it was “the W3C standard”. It is _not_ trivial
that you are wrong, because W3C standards/Recommendations have significance
to developers: It usually means that there are at least two interoperable
implementations of the specified feature. (If only you knew what you are
talking about.)

> of one's post

It has been claimed by at least two people, and proved by at least one
person (me), that *you* are wrong. Live with it.

> instead of giving a real solution to the OP.

This is not a support forum. It is a discussion forum. You have argued
something based on a false premise. That premise has been discussed, and
proven wrong, so that it can be safely ignored.

> I don't know what you do for living, but it is obvious that you have too
> much time in your hands to spend all day long trying to prove you are
> always right. Do your boss know about it?

Argumentum ad hominem again. You should be ashamed of yourself that you
resort to such low blows.

> Okay, only W3C's Recommendations are the "web standards".

Finally he can see, and it only took him … a few years? :->

> But tell me: is there any reason to not test for pageYOffset support first
> in the OP's code?

I will not waste more time to consider that question – yet another strawman
argument – because of your anti-social behavior and because I have never
claimed that there was such a reason in the first place. It is only you who
has (intentionally?) misinterpreted my comment. May you die in ignorance.

Score adjusted

Joao Rodrigues

unread,
May 27, 2013, 12:12:33 PM5/27/13
to
On 27/05/2013 12:27, Thomas 'PointedEars' Lahn wrote:
> Joao Rodrigues wrote:
>>>>>
>>>>> Do you not understand the difference between a standard and a working
>>>>> draft?
>>>>
>>>> Of course, I do! The fact is *all* browsers (even IE9 / 10 !!!) are
>>>> compatible with pageY[X]Offset nowadays. So there's no plausible reason
>>>> to not use these properties nowadays.
>>>
>>> Red herring. You have claimed it would be “the W3C standard”; it is not.
>>
>> You insist in answering a fallacy with another.
>
> There is no fallacy on my part;

Yes, sir, there is! And you know exactly where.

> you claimed something that I have proven
> wrong.

You have proven?! You have only spotted that was a W3C's Working Draft;
ie, a Recommendation to-be in some time in the future. Just that!

<snip>

>> But tell me: is there any reason to not test for pageYOffset support first
>> in the OP's code?
>
> I will not waste more time to consider that question – yet another strawman
> argument – because of your anti-social behavior...

You are gazing at yourself in the mirror. Freud explains.

> and because I have never
> claimed that there was such a reason in the first place. It is only you who
> has (intentionally?) misinterpreted my comment. May you die in ignorance.
>
> Score adjusted

How can you be so pedantic?
--
Joao Rodrigues

Thomas 'PointedEars' Lahn

unread,
May 27, 2013, 12:45:19 PM5/27/13
to
Joao Rodrigues wrote:

> On 27/05/2013 12:27, Thomas 'PointedEars' Lahn wrote:
>> you claimed something that I have proven wrong.
>
> You have proven?! You have only spotted that was a W3C's Working Draft;
> ie, a Recommendation to-be in some time in the future. Just that!

A Working Draft ist _not_ “a Recommendation to-be some time in the future”.
It is something that *might become* a Recommendation some time in the
future. Not only the W3C Process Document, that I cited, but also the
paragraph that I quoted from the very document that you cited makes that
*very* clear to anyone who can read.

F'up2 where it belongs

Thomas 'PointedEars' Lahn

unread,
May 27, 2013, 1:41:54 PM5/27/13
to
Joao Rodrigues wrote:

> On 27/05/2013 12:27, Thomas 'PointedEars' Lahn wrote:
>> you claimed something that I have proven wrong.
>
> You have proven?! You have only spotted that was a W3C's Working Draft;
> ie, a Recommendation to-be in some time in the future. Just that!

A Working Draft ist _not_ “a Recommendation to-be some time in the future”.
It is something that *might become* a Recommendation some time in the
future. Not only the W3C Process Document, that I cited, but also the
paragraph that I quoted from the very document that you cited makes that
*very* clear to anyone who can read.

Joao Rodrigues

unread,
May 27, 2013, 2:24:04 PM5/27/13
to
On 27/05/2013 14:41, Thomas 'PointedEars' Lahn wrote:
> Joao Rodrigues wrote:
>
>> On 27/05/2013 12:27, Thomas 'PointedEars' Lahn wrote:
>>> you claimed something that I have proven wrong.
>>
>> You have proven?! You have only spotted that was a W3C's Working Draft;
>> ie, a Recommendation to-be in some time in the future. Just that!
>
> A Working Draft ist _not_ “a Recommendation to-be some time in the future”.
> It is something that *might become* a Recommendation some time in the
> future. Not only the W3C Process Document, that I cited, but also the
> paragraph that I quoted from the very document that you cited makes that
> *very* clear to anyone who can read.
>

The W3C Editors' Draft has just been updated (27 May 2013):
<http://dev.w3.org/csswg/cssom-view/>

Note that the pageYOffset attribute (which actually returns the same
value returned by the scrollY attribute) is just one item among many
others of that document. AFAIC pageYOffset hasn't changed since the
latest version of the Working Draft.

Nowadays, pageYOffset is widely supported by *all* major web browsers
(IE9+, FF3+, Safari 4+, Chrome 4+, Opera 10+) since the Working Draft
was produced by the W3C's CSS Working Group (people from Microsoft,
Google, Mozilla, Opera, Apple, Adobe, W3C Staff, HP, Intel, etc., even
from jQuery Foundation - sorry to let you know that.)
<http://www.w3.org/Style/CSS/members>

Therefore, going back to the OP's code, I cannot see any reason to not
test for window.pageYOffset before testing for the MSIE proprietary
scrollTop.


--
Joao Rodrigues

Thomas 'PointedEars' Lahn

unread,
May 27, 2013, 3:10:10 PM5/27/13
to
Joao Rodrigues wrote:

> On 27/05/2013 14:41, Thomas 'PointedEars' Lahn wrote:
>> Joao Rodrigues wrote:
>>> On 27/05/2013 12:27, Thomas 'PointedEars' Lahn wrote:
>>>> you claimed something that I have proven wrong.
>>> You have proven?! You have only spotted that was a W3C's Working Draft;
>>> ie, a Recommendation to-be in some time in the future. Just that!
>>
>> A Working Draft ist _not_ “a Recommendation to-be some time in the
>> future”. It is something that *might become* a Recommendation some time
>> in the future. Not only the W3C Process Document, that I cited, but also
>> the paragraph that I quoted from the very document that you cited makes
>> that *very* clear to anyone who can read.
>
> The W3C Editors' Draft has just been updated (27 May 2013):
> <http://dev.w3.org/csswg/cssom-view/>
>
> Note that the pageYOffset attribute (which actually returns the same
> value returned by the scrollY attribute) is just one item among many
> others of that document. AFAIC pageYOffset hasn't changed since the
> latest version of the Working Draft.

An Editor's Draft has even less significance than a Working Draft. A
Recommendation has the support of the W3C Membership, which is why it is
reasonably called a “Web standard”. A Working Draft usually (but not
always) has the support of all people of the Working Group (and so, it can
be assumed, by the companies they work for, unless they are independent
invited experts). An Editor's Draft does not have even that.

> Nowadays, pageYOffset is widely supported by *all* major web browsers
> (IE9+, FF3+, Safari 4+, Chrome 4+, Opera 10+) since the Working Draft
> was produced by the W3C's CSS Working Group (people from Microsoft,
> Google, Mozilla, Opera, Apple, Adobe, W3C Staff, HP, Intel, etc., even
> from jQuery Foundation - sorry to let you know that.)
> <http://www.w3.org/Style/CSS/members>

Do you really not realize how embarrassing your continuing unfounded, stupid
megalomania is for you? I have been doing professional Web development for
13 years now, Web development in general even longer, and I certainly do not
need to be lectured – by you of all people – about browser support or the
W3C.

> Therefore, going back to the OP's code, I cannot see any reason to not
> test for window.pageYOffset before testing for the MSIE proprietary
> scrollTop.

The thing that you apparently are unable to understand is that *both*
properties are nothing but proprietary as of now.

Denis McMahon

unread,
May 27, 2013, 5:24:45 PM5/27/13
to
On Mon, 27 May 2013 09:45:45 -0300, Joao Rodrigues wrote:

> Maybe you haven't scrolled the page downwards
> before executing the code...

*headdesks*

--
Denis McMahon, denismf...@gmail.com

Joao Rodrigues

unread,
May 27, 2013, 5:35:26 PM5/27/13
to
On 27/05/2013 16:10, Thomas 'PointedEars' Lahn wrote:
> Joao Rodrigues wrote:
>> The W3C Editors' Draft has just been updated (27 May 2013):
>> <http://dev.w3.org/csswg/cssom-view/>
>>
>> Note that the pageYOffset attribute (which actually returns the same
>> value returned by the scrollY attribute) is just one item among many
>> others of that document. AFAIC pageYOffset hasn't changed since the
>> latest version of the Working Draft.
>
> An Editor's Draft has even less significance than a Working Draft. A
> Recommendation has the support of the W3C Membership, which is why it is
> reasonably called a “Web standard”. A Working Draft usually (but not
> always) has the support of all people of the Working Group (and so, it can
> be assumed, by the companies they work for, unless they are independent
> invited experts). An Editor's Draft does not have even that.

You talk as if you were a member of the W3C or the CSS Working Group.
But searching for "Thomas PointedEars Lahn" in Google, I couldn't find
anything about your work other than thousands of posts in Usenet, many
of them containing pedantic assertions and/or aggressive and abusive
language specially with newcomers.

>
>> Nowadays, pageYOffset is widely supported by *all* major web browsers
>> (IE9+, FF3+, Safari 4+, Chrome 4+, Opera 10+) since the Working Draft
>> was produced by the W3C's CSS Working Group (people from Microsoft,
>> Google, Mozilla, Opera, Apple, Adobe, W3C Staff, HP, Intel, etc., even
>> from jQuery Foundation - sorry to let you know that.)
>> <http://www.w3.org/Style/CSS/members>
>
> Do you really not realize how embarrassing your continuing unfounded, stupid
> megalomania is for you?

Only you are the megalomaniac here, mister. Do you think you are of any
importance in the web development world? If so, where are your videos,
books and any other reference material. Personal website doesn't count.

> I have been doing professional Web development for
> 13 years now, Web development in general even longer,

Professional?! I don't think so. Obviously you live on Government funds,
doing nothing all day long other than abusing and trolling everybody
here in comp.lang.javascript. And you have been doing that for long 13
years for sure. That's what Internet archives tell me so. Angela Merkel
should be told about that.

> and I certainly do not
> need to be lectured – by you of all people – about browser support or the
> W3C.
>

Quoting you: "Usenet is _not_ a one-to-one communications medium". So,
I'm not lecturing anything.

>> Therefore, going back to the OP's code, I cannot see any reason to not
>> test for window.pageYOffset before testing for the MSIE proprietary
>> scrollTop.
>
> The thing that you apparently are unable to understand is that *both*
> properties are nothing but proprietary as of now.
>

That pageYOffset is proprietary?!?! Now you're delusional.

--
Joao Rodrigues

Thomas 'PointedEars' Lahn

unread,
May 27, 2013, 6:00:47 PM5/27/13
to
Joao Rodrigues wrote:

> On 27/05/2013 16:10, Thomas 'PointedEars' Lahn wrote:
>> Joao Rodrigues wrote:
>
> [libel]
>
>>> Therefore, going back to the OP's code, I cannot see any reason to not
>>> test for window.pageYOffset before testing for the MSIE proprietary
>>> scrollTop.
>>
>> The thing that you apparently are unable to understand is that *both*
>> properties are nothing but proprietary as of now.
>
> That pageYOffset is proprietary?!?! Now you're delusional.

“Multiple exclamation marks,” he went on, shaking his head,
“are a sure sign of a diseased mind.”

─Terry Pratchett, “Eric”

Stefan Weiss

unread,
May 27, 2013, 8:30:22 PM5/27/13
to
On 2013-05-27 17:27, Thomas 'PointedEars' Lahn wrote:
> Joao Rodrigues wrote:
>> But tell me: is there any reason to not test for pageYOffset support first
>> in the OP's code?
>
> I will not waste more time to consider that question – [vitriolic rhetorics
> elided]. May you die in ignorance. [whoops, missed one]

You have managed to avoid answering the only clear and practically
relevant question in this sub-thread. Let me give you a new target for
your spitballs and answer it:

At this time, there is no good reason not to try pageYOffset first.

Double negative removed for clarity:

Do try pageYOffset first.


> Score adjusted

Curtains adjusted.
I hope you are all as interested in my curtains as I am.


- stefan
0 new messages