nodejs_chromium 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +2 -2
  2. package/package.json +1 -1
  3. package/src/chrome.js +780 -732
package/index.js CHANGED
@@ -6,7 +6,7 @@ global.__UA__ = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (K
6
6
  async function newChrome(params) {
7
7
  let {
8
8
  id = 'myChrome',
9
- view = false,
9
+ visible = false,
10
10
  width = 1024,
11
11
  height = 768,
12
12
  scale = 1,
@@ -23,7 +23,7 @@ async function newChrome(params) {
23
23
  userDataDir: `runtime/template/${id}`,
24
24
  // timeout: 500,//最大允许超时间,默认为3000,最小215,一般不要设置
25
25
  slowMo, //每一步停留时间,不能太大,否则会太慢,特别是在类似写入很多Cookies时,每写入一个都要等一下。
26
- headless: view ? false : 'new', //'new',设置是否在无头模式下运行浏览器,false=会启动浏览器,true=无界面
26
+ headless: visible ? false : 'new', //'new',设置是否在无头模式下运行浏览器,false=会启动浏览器,true=无界面
27
27
  devtools: !!debug, //打开调试
28
28
  ignoreHTTPSErrors: true, //忽略 HTTPS 错误。屏蔽跳转不同域名的报错
29
29
  ignoreDefaultArgs: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodejs_chromium",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {