| Conditions | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | // @ts-check |
||
| 6 | connectedCallback() { |
||
| 7 | const form = this.querySelector('form'); |
||
| 8 | |||
| 9 | if (!form) { |
||
| 10 | console.warn('<form> element not found'); |
||
| 11 | return; |
||
| 12 | } |
||
| 13 | |||
| 14 | const eventName = this.getAttribute('on') || 'form:request-submit'; |
||
| 15 | |||
| 16 | this.addEventListener(eventName, () => { |
||
| 17 | form.requestSubmit(); |
||
| 18 | }); |
||
| 19 | } |
||
| 20 | } |
||
| 22 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.