mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-10 17:35:00 -06:00
WebUI: prefer arrow functions whenever applicable
Compared to plain function, arrow function is simpler to understand (without bindings to `this`, `arguments`, `super`) and to read. Now, plain function will only be used when this object is required. PR #21691.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
function submitLoginForm(event) {
|
||||
const submitLoginForm = (event) => {
|
||||
event.preventDefault();
|
||||
const errorMsgElement = document.getElementById("error_msg");
|
||||
|
||||
@@ -56,7 +56,7 @@ function submitLoginForm(event) {
|
||||
|
||||
// clear the field
|
||||
passwordElement.value = "";
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const loginForm = document.getElementById("loginform");
|
||||
|
||||
Reference in New Issue
Block a user