DalekJS: start browser with custom flags

我是研究僧i 提交于 2020-01-02 18:54:28

问题


Is there a way to pass flags / command line switches to the browser being used with DalekJS?

Esentially, I want to use Chrome with some experimental features turned on: http://peter.sh/experiments/chromium-command-line-switches/

Vanilla CLI startup of custom Chrome looks like:

open -a Google\ Chrome --args --enable-experimental-web-platform-features

How can I feed those args to Dalek's instance of Chrome?


回答1:


This hasn't made it into the official docs yet, but I recently merged a pull request that allows you exactly that:

See https://github.com/dalekjs/dalek-browser-chrome/pull/8 for more details. You can add the instructions to your Dalekfile.json like so:

{
    "browsers": [{
        "chrome": {
            "chromeOptions": {
                "args": ["enable-experimental-web-platform-features", "js-flags=--harmony"]
            }
        }
    }]
}


来源:https://stackoverflow.com/questions/22206520/dalekjs-start-browser-with-custom-flags

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!