最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to set Electron size in Nightmare.js? - Stack Overflow

programmeradmin3浏览0评论

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 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}});
Share Improve this question edited Aug 2, 2016 at 17:37 Artjom B. 62k26 gold badges135 silver badges230 bronze badges asked Aug 2, 2016 at 8:22 RichardRichard 16.9k25 gold badges78 silver badges109 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

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.

In other words,

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

... should work.

发布评论

评论列表(0)

  1. 暂无评论