A helper for `document.createElement()` that can be loaded into a script with `require`.
ეს სკრიპტი არ უნდა იყოს პირდაპირ დაინსტალირებული. ეს ბიბლიოთეკაა, სხვა სკრიპტებისთვის უნდა ჩართეთ მეტა-დირექტივაში // @require https://update.greasyfork.org/scripts/559372/1716611/create-element-helper.js.
Load it in the script header.
// @require https://update.greasyfork.org/scripts/559372/create-element-helper.js
tag() calls createElement() and returns a helper.
document.createElement('input')
// ↓
tag('input')
Set attributes by method chaining via helpers.
const input = document.createElement('input')
input.setAttribute('id', 'search')
input.classList.add('search')
// ↓
tag('input').id('search').cssClass('search')