A helper for `document.createElement()` that can be loaded into a script with `require`.
Tento skript by nemal byť nainštalovaný priamo. Je to knižnica pre ďalšie skripty, ktorú by mali používať cez meta príkaz // @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')