diff --git a/src/Browser/BrowserProcess.php b/src/Browser/BrowserProcess.php index 0390a0a..19361b9 100644 --- a/src/Browser/BrowserProcess.php +++ b/src/Browser/BrowserProcess.php @@ -321,7 +321,13 @@ private function getArgsFromOptions($binary, array $options) // enable headless mode if (!\array_key_exists('headless', $options) || $options['headless']) { - $args[] = '--headless'; + // enable the new headless mode available from Chrome 112 and up + if (\array_key_exists('headless', $options) && 'new' === $options['headless']) { + $args[] = '--headless=new'; + } else { + $args[] = '--headless'; + } + $args[] = '--disable-gpu'; $args[] = '--font-render-hinting=none'; $args[] = '--hide-scrollbars';