Skip to content

Commit f92e8a8

Browse files
committed
Update api docs
1 parent 942a238 commit f92e8a8

File tree

2 files changed

+305
-1
lines changed

2 files changed

+305
-1
lines changed

api-manual/api/browser.md

Lines changed: 304 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,304 @@
1+
# browser
2+
3+
|函数名|函数描述/介绍|
4+
|:------|:--------|
5+
| [browser.Close](#close) ||
6+
| [browser.CloseAll](#closeall) ||
7+
| [browser.Get](#get) ||
8+
| [browser.HaveBrowserInstalled](#havebrowserinstalled) ||
9+
| [browser.List](#list) ||
10+
| [browser.Open](#open) ||
11+
| [browser.controlURL](#controlurl) ||
12+
| [browser.exePath](#exepath) ||
13+
| [browser.headless](#headless) ||
14+
| [browser.id](#id) ||
15+
| [browser.leakless](#leakless) ||
16+
| [browser.noSandBox](#nosandbox) ||
17+
| [browser.proxy](#proxy) ||
18+
| [browser.timeout](#timeout) ||
19+
| [browser.wsAddress](#wsaddress) ||
20+
21+
22+
## 函数定义
23+
### Close
24+
25+
#### 详细描述
26+
27+
28+
#### 定义
29+
30+
`Close(opts ...BrowserOption) error`
31+
32+
#### 参数
33+
|参数名|参数类型|参数解释|
34+
|:-----------|:---------- |:-----------|
35+
| opts | `...BrowserOption` | |
36+
37+
#### 返回值
38+
|返回值(顺序)|返回值类型|返回值解释|
39+
|:-----------|:---------- |:-----------|
40+
| r1 | `error` | |
41+
42+
43+
### CloseAll
44+
45+
#### 详细描述
46+
47+
48+
#### 定义
49+
50+
`CloseAll()`
51+
52+
53+
### Get
54+
55+
#### 详细描述
56+
57+
58+
#### 定义
59+
60+
`Get(opts ...BrowserOption) (*BrowserInstance, error)`
61+
62+
#### 参数
63+
|参数名|参数类型|参数解释|
64+
|:-----------|:---------- |:-----------|
65+
| opts | `...BrowserOption` | |
66+
67+
#### 返回值
68+
|返回值(顺序)|返回值类型|返回值解释|
69+
|:-----------|:---------- |:-----------|
70+
| r1 | `*BrowserInstance` | |
71+
| r2 | `error` | |
72+
73+
74+
### HaveBrowserInstalled
75+
76+
#### 详细描述
77+
78+
79+
#### 定义
80+
81+
`HaveBrowserInstalled() bool`
82+
83+
#### 返回值
84+
|返回值(顺序)|返回值类型|返回值解释|
85+
|:-----------|:---------- |:-----------|
86+
| r1 | `bool` | |
87+
88+
89+
### List
90+
91+
#### 详细描述
92+
93+
94+
#### 定义
95+
96+
`List() []string`
97+
98+
#### 返回值
99+
|返回值(顺序)|返回值类型|返回值解释|
100+
|:-----------|:---------- |:-----------|
101+
| r1 | `[]string` | |
102+
103+
104+
### Open
105+
106+
#### 详细描述
107+
108+
109+
#### 定义
110+
111+
`Open(opts ...BrowserOption) (*BrowserInstance, error)`
112+
113+
#### 参数
114+
|参数名|参数类型|参数解释|
115+
|:-----------|:---------- |:-----------|
116+
| opts | `...BrowserOption` | |
117+
118+
#### 返回值
119+
|返回值(顺序)|返回值类型|返回值解释|
120+
|:-----------|:---------- |:-----------|
121+
| r1 | `*BrowserInstance` | |
122+
| r2 | `error` | |
123+
124+
125+
### controlURL
126+
127+
#### 详细描述
128+
129+
130+
#### 定义
131+
132+
`controlURL(controlURL string) BrowserOption`
133+
134+
#### 参数
135+
|参数名|参数类型|参数解释|
136+
|:-----------|:---------- |:-----------|
137+
| controlURL | `string` | |
138+
139+
#### 返回值
140+
|返回值(顺序)|返回值类型|返回值解释|
141+
|:-----------|:---------- |:-----------|
142+
| r1 | `BrowserOption` | |
143+
144+
145+
### exePath
146+
147+
#### 详细描述
148+
149+
150+
#### 定义
151+
152+
`exePath(exePath string) BrowserOption`
153+
154+
#### 参数
155+
|参数名|参数类型|参数解释|
156+
|:-----------|:---------- |:-----------|
157+
| exePath | `string` | |
158+
159+
#### 返回值
160+
|返回值(顺序)|返回值类型|返回值解释|
161+
|:-----------|:---------- |:-----------|
162+
| r1 | `BrowserOption` | |
163+
164+
165+
### headless
166+
167+
#### 详细描述
168+
169+
170+
#### 定义
171+
172+
`headless(headless bool) BrowserOption`
173+
174+
#### 参数
175+
|参数名|参数类型|参数解释|
176+
|:-----------|:---------- |:-----------|
177+
| headless | `bool` | |
178+
179+
#### 返回值
180+
|返回值(顺序)|返回值类型|返回值解释|
181+
|:-----------|:---------- |:-----------|
182+
| r1 | `BrowserOption` | |
183+
184+
185+
### id
186+
187+
#### 详细描述
188+
189+
190+
#### 定义
191+
192+
`id(id string) BrowserOption`
193+
194+
#### 参数
195+
|参数名|参数类型|参数解释|
196+
|:-----------|:---------- |:-----------|
197+
| id | `string` | |
198+
199+
#### 返回值
200+
|返回值(顺序)|返回值类型|返回值解释|
201+
|:-----------|:---------- |:-----------|
202+
| r1 | `BrowserOption` | |
203+
204+
205+
### leakless
206+
207+
#### 详细描述
208+
209+
210+
#### 定义
211+
212+
`leakless(leakless bool) BrowserOption`
213+
214+
#### 参数
215+
|参数名|参数类型|参数解释|
216+
|:-----------|:---------- |:-----------|
217+
| leakless | `bool` | |
218+
219+
#### 返回值
220+
|返回值(顺序)|返回值类型|返回值解释|
221+
|:-----------|:---------- |:-----------|
222+
| r1 | `BrowserOption` | |
223+
224+
225+
### noSandBox
226+
227+
#### 详细描述
228+
229+
230+
#### 定义
231+
232+
`noSandBox(noSandBox bool) BrowserOption`
233+
234+
#### 参数
235+
|参数名|参数类型|参数解释|
236+
|:-----------|:---------- |:-----------|
237+
| noSandBox | `bool` | |
238+
239+
#### 返回值
240+
|返回值(顺序)|返回值类型|返回值解释|
241+
|:-----------|:---------- |:-----------|
242+
| r1 | `BrowserOption` | |
243+
244+
245+
### proxy
246+
247+
#### 详细描述
248+
249+
250+
#### 定义
251+
252+
`proxy(proxyAddress string) BrowserOption`
253+
254+
#### 参数
255+
|参数名|参数类型|参数解释|
256+
|:-----------|:---------- |:-----------|
257+
| proxyAddress | `string` | |
258+
259+
#### 返回值
260+
|返回值(顺序)|返回值类型|返回值解释|
261+
|:-----------|:---------- |:-----------|
262+
| r1 | `BrowserOption` | |
263+
264+
265+
### timeout
266+
267+
#### 详细描述
268+
269+
270+
#### 定义
271+
272+
`timeout(timeout float64) BrowserOption`
273+
274+
#### 参数
275+
|参数名|参数类型|参数解释|
276+
|:-----------|:---------- |:-----------|
277+
| timeout | `float64` | |
278+
279+
#### 返回值
280+
|返回值(顺序)|返回值类型|返回值解释|
281+
|:-----------|:---------- |:-----------|
282+
| r1 | `BrowserOption` | |
283+
284+
285+
### wsAddress
286+
287+
#### 详细描述
288+
289+
290+
#### 定义
291+
292+
`wsAddress(wsAddress string) BrowserOption`
293+
294+
#### 参数
295+
|参数名|参数类型|参数解释|
296+
|:-----------|:---------- |:-----------|
297+
| wsAddress | `string` | |
298+
299+
#### 返回值
300+
|返回值(顺序)|返回值类型|返回值解释|
301+
|:-----------|:---------- |:-----------|
302+
| r1 | `BrowserOption` | |
303+
304+

api-manual/api/simulator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ htmlChangeMode|(simulator.loginDetectMode) 1|
77
leaklessDefault|(simulator.LeaklessMode) 0|
88
leaklessOff|(simulator.LeaklessMode) -1|
99
leaklessOn|(simulator.LeaklessMode) 1|
10-
simple|(map[string]interface {}) map[string]interface {}{"CreateBrowser": (func(...simple.BrowserConfigOpt) (*simple.VBrowser, error))(0x35d9fc0), "bodyModifyTarget": "body", "bodyReplaceTarget": "bodyReplace", "createBrowser": (func(...simple.BrowserConfigOpt) (*simple.VBrowser, error))(0x35d9fc0), "exePath": (func(string) simple.BrowserConfigOpt)(0x35d95c0), "headersModifyTarget": "headers", "headless": (func(bool) simple.BrowserConfigOpt)(0x35d98c0), "hijack": (func(bool) simple.BrowserConfigOpt)(0x35d9940), "hostModifyTarget": "host", "leakless": (func(bool) simple.BrowserConfigOpt)(0x35d9f40), "noSandBox": (func(bool) simple.BrowserConfigOpt)(0x35d9840), "proxy": (func(string, ...string) simple.BrowserConfigOpt)(0x35d96a0), "requestModify": (func(string, simple.ModifyTarget, interface {}) simple.BrowserConfigOpt)(0x35d9c40), "responseModify": (func(string, simple.ModifyTarget, interface {}) simple.BrowserConfigOpt)(0x35d99c0), "timeout": (func(int) simple.BrowserConfigOpt)(0x35d9ec0), "wsAddress": (func(string) simple.BrowserConfigOpt)(0x35d94e0)}|
10+
simple|(map[string]interface {}) map[string]interface {}{"CreateBrowser": (func(...simple.BrowserConfigOpt) (*simple.VBrowser, error))(0x35e4ae0), "bodyModifyTarget": "body", "bodyReplaceTarget": "bodyReplace", "createBrowser": (func(...simple.BrowserConfigOpt) (*simple.VBrowser, error))(0x35e4ae0), "exePath": (func(string) simple.BrowserConfigOpt)(0x35e40e0), "headersModifyTarget": "headers", "headless": (func(bool) simple.BrowserConfigOpt)(0x35e43e0), "hijack": (func(bool) simple.BrowserConfigOpt)(0x35e4460), "hostModifyTarget": "host", "leakless": (func(bool) simple.BrowserConfigOpt)(0x35e4a60), "noSandBox": (func(bool) simple.BrowserConfigOpt)(0x35e4360), "proxy": (func(string, ...string) simple.BrowserConfigOpt)(0x35e41c0), "requestModify": (func(string, simple.ModifyTarget, interface {}) simple.BrowserConfigOpt)(0x35e4760), "responseModify": (func(string, simple.ModifyTarget, interface {}) simple.BrowserConfigOpt)(0x35e44e0), "timeout": (func(int) simple.BrowserConfigOpt)(0x35e49e0), "wsAddress": (func(string) simple.BrowserConfigOpt)(0x35e4000)}|
1111
stringMatchMode|(simulator.loginDetectMode) 2|
1212
urlChangeMode|(simulator.loginDetectMode) 0|
1313

0 commit comments

Comments
 (0)