| Total Complexity | 1 |
| Complexity/F | 0 |
| Lines of Code | 25 |
| Function Count | 0 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import "animate.css"; |
||
| 2 | |||
| 3 | import checkValidText from "./classes/ValidText/classValidText"; |
||
| 4 | import sendForm from "./classes/ProcessInputForm/classProcessInputForm"; |
||
| 5 | |||
| 6 | const initialize = () => { |
||
| 7 | const textInput = window.document.getElementById( |
||
| 8 | "bilinformasjon" |
||
| 9 | ) as HTMLInputElement; |
||
| 10 | const textForm = window.document.getElementById( |
||
| 11 | "regnrform" |
||
| 12 | ) as HTMLFormElement; |
||
| 13 | |||
| 14 | if (textInput && textForm) { |
||
| 15 | textInput.addEventListener("input", checkValidText); |
||
| 16 | |||
| 17 | textForm.addEventListener("submit", (event) => { |
||
| 18 | sendForm(); |
||
| 19 | event.preventDefault(); |
||
| 20 | }); |
||
| 21 | } |
||
| 22 | }; |
||
| 23 | |||
| 24 | initialize(); |
||
| 25 |