Add todo widget
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user