ScrollHeight is now saved in a variable to avoid costly root.scrollHeight lookup.