clientWidth is supported everywhere

Not to mention that, since you weren't checking it in the scroll handler, if the user resized the page, it wouldn't take that into account.