DalekJS:使用自定义标志启动浏览器 [英] DalekJS: start browser with custom flags

查看:108
本文介绍了DalekJS:使用自定义标志启动浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将标志/命令行切换传递给与DalekJS一起使用的浏览器?

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

基本上,我想使用具有以下实验功能的Chrome: http://peter.sh/experiments/chromium-command-line-switches/

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

自定义Chrome的Vanilla CLI启动看起来像:

Vanilla CLI startup of custom Chrome looks like:

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

如何将这些args馈送到Dalek的Chrome实例?

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

推荐答案

这还没有成为正式文档,但是我最近合并了一个pull请求,该请求完全允许您这样做:

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

请参见 https://github.com/dalekjs/dalek-browser-chrome/pull/8 了解更多详情. 您可以像这样将说明添加到您的Dalekfile.json:

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"]
            }
        }
    }]
}

这篇关于DalekJS:使用自定义标志启动浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆