mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-05 01:51:23 +01:00
chore: add npm + vite for progressive enhancement
This commit is contained in:
parent
0c26f0831f
commit
3490ad9865
1374 changed files with 111037 additions and 19 deletions
11
src/utils/shorthands.js
Normal file
11
src/utils/shorthands.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
const byId = document.getElementById.bind(document);
|
||||
|
||||
Node.prototype.on = function (name, fn, options) {
|
||||
this.addEventListener(name, fn, options);
|
||||
return this;
|
||||
};
|
||||
|
||||
Node.prototype.off = function (name, fn) {
|
||||
this.removeEventListener(name, fn);
|
||||
return this;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue