简体   繁体   English

如何在Nightmare.js中设置电子尺寸?

[英]How to set Electron size in Nightmare.js?

The Nightmare docs don't specify how to set the browser details. 梦魇文档没有指定如何设置浏览器详细信息。

I'm guessing it's like this, but it doesn't work. 我猜这是这样的,但它不起作用。 Any ideas? 有任何想法吗?

const nightmare = new Nightmare({'show': show, 'BrowserWindow': {height: 900}});

The documentation isn't terrifically clear, but the intent is to show that the Nightmare options are passed to BrowserWindow , effectively using the same options set. 文档不清晰得不得了 ,但目的是为了表明噩梦选项都传递给BrowserWindow ,有效利用设置相同的选项。

In other words, 换一种说法,

const nightmare = new Nightmare({ show: show, height: 900});

... should work. ... 应该管用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM