document.scrollingElement
document.scrollingElement copied to clipboard
Make safe to include and run in a node environment
Check to see if document exists before trying to install the polyfill. This makes it safe to run in a node environment and blindly include in a build for "isomorphic" projects.
I’m confused. Wouldn’t this still throw ReferenceError: document is not defined?
Totally right. I should think and code at the same time. :) Once more unto the breach, this time with feeling. (Redid the PR.)