8a3c276b0dffdad12c0d390e42b9d4a49452b17b
[yaffs-website] / commands / javascript / set_js_errors.md
1 set_js_errors
2 =============
3 This command allows you to enable/disable javascript error control when executing commands.
4
5 When javascript error control is enabled all commands where the page has javascript errors will fail.
6
7 This is a good practice so you can detect any javascript errors on your pages.
8
9
10 ##Enable javascript error control
11 ####Request
12 ```json
13 {
14     "name": "set_js_errors",
15     "args": [
16         true
17     ]
18 }
19 ```
20 ####Response
21 ```json
22 {
23     "response": true
24 }
25 ```
26 ##Disable javascript error control
27 ####Request
28 ```json
29 {
30     "name": "set_js_errors",
31     "args": [
32         false
33     ]
34 }
35 ```
36 ####Response
37 ```json
38 {
39     "response": true
40 }
41 ```