Clarified docs
Avoid using window object in module scope