def resize(self):
        """Resize virtual tab viewport to match user's viewport"""
        try:
            self.tab.set_viewport(_get_viewport(self.data['size']))
        except (KeyError, AttributeError):
            pass  # Tab isn't open. The size will be set when opened
Resize virtual tab viewport to match user's viewport
slyd/slyd/splash/commands.py