mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
remove most shortcuts
This commit is contained in:
parent
77430e2dbe
commit
5d919116dc
2 changed files with 28 additions and 40 deletions
|
|
@ -1,16 +1,4 @@
|
|||
const query = document.querySelector.bind(document);
|
||||
const queryAll = document.querySelectorAll.bind(document);
|
||||
const byId = document.getElementById.bind(document);
|
||||
const byClass = document.getElementsByClassName.bind(document);
|
||||
const byTag = document.getElementsByTagName.bind(document);
|
||||
|
||||
Node.prototype.query = function (selector) {
|
||||
return this.querySelector(selector);
|
||||
};
|
||||
|
||||
Node.prototype.queryAll = function (selector) {
|
||||
return this.querySelectorAll(selector);
|
||||
};
|
||||
|
||||
Node.prototype.on = function (name, fn, options) {
|
||||
this.addEventListener(name, fn, options);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue