Bind event handlers to window only if an `in-view` element is defined.
Fixes #3.