Add todo widget

This commit is contained in:
Svilen Markov
2025-05-08 16:59:02 +01:00
parent 4ed8bef562
commit dd91a506fa
16 changed files with 800 additions and 2 deletions
+10 -1
View File
@@ -29,6 +29,15 @@ export function findAll(selector) {
return document.querySelectorAll(selector);
}
HTMLCollection.prototype.map = function(fn) {
return Array.from(this).map(fn);
}
HTMLCollection.prototype.indexOf = function(element) {
return Array.prototype.indexOf.call(this, element);
}
const ep = HTMLElement.prototype;
const fp = DocumentFragment.prototype;
const tp = Text.prototype;
@@ -110,7 +119,7 @@ ep.appendTo = function(parent) {
return this;
}
ep.swap = function(element) {
ep.swapWith = function(element) {
this.replaceWith(element);
return element;
}