1 | // formToObject |
||
2 | function formEvent(form, rest_form, error, success) { |
||
0 ignored issues
–
show
|
|||
3 | console.log(form); |
||
0 ignored issues
–
show
|
|||
4 | |||
5 | form.addEventListener("submit", function (event) { |
||
6 | console.log(this); |
||
0 ignored issues
–
show
|
|||
7 | |||
8 | var data = formToObject(this); |
||
9 | var method = data.method; |
||
10 | delete data.method; |
||
11 | delete data.submit; |
||
12 | |||
13 | console.log(method); |
||
14 | |||
15 | rest_form.byMethod(method, data); |
||
16 | console.log(data); |
||
17 | |||
18 | event.preventDefault(); |
||
19 | }); |
||
20 | } |
||
21 |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.