It seems body.scrollTop
(and body.scrollLeft
) are deprecated in ES5 strict-mode. What is the reason for this, given that it still seems okay to use these properties on other DOMElement
s?
Background Info:
I have a function that tries to increase (or decrease, as specified) the scrollTop
values of all the ancestors of an element
, till one of these actually changes. I am wondering if, to stay complaint with strict-mode, I should specifically check against the body
element as the chain of parents moves upward.
[Obviously, body
refers to document.body
]
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…