added bad input feedback - warn injection

This commit is contained in:
Xzide
2023-06-02 14:33:24 -04:00
parent c6a18922d2
commit 2a11b63eb1
2 changed files with 77 additions and 4 deletions

View File

@@ -219,4 +219,16 @@ class Util {
if (num && num > 0 && num <= 5000) return true
else return false
}
/**
* @param {*} param An simple warning injection
* @param {*} kind A a string id to identify the warn element
*/
static warnInjection(param, kind) {
if (!param) return;
const element = document.createElement('span')
element.setAttribute('id', kind)
element.textContent = param
return element
}
}