support for window as viewport instead of element