public function window()
{
// close current window
if (func_num_args() === 0) {
$this->curl('DELETE', '/window');
return $this;
}
// set focus
$arg = func_get_arg(0);
// window handle or name attribute
if (is_array($arg)) {
$this->curl('POST', '/window', $arg);
return $this;
}
// chaining
return new Window($this->url . '/window', $arg);
}