sreenshot method moved to Layers
making it headless-safe - passing a global/window object