Remove DOMTokenList.prototype.replace polyfill

This commit is contained in:
Mimi 2021-10-08 22:01:04 +08:00
parent 56daf4049e
commit f84e5304ce
2 changed files with 0 additions and 9 deletions

View File

@ -79,7 +79,6 @@
time {
border-bottom: 1px dashed $grey-dark;
cursor: pointer;
}
}

View File

@ -6,14 +6,6 @@ HTMLElement.prototype.wrap = function(wrapper) {
wrapper.appendChild(this);
};
// https://caniuse.com/mdn-api_element_classlist_replace
if (typeof DOMTokenList.prototype.replace !== 'function') {
DOMTokenList.prototype.replace = function(remove, add) {
this.remove(remove);
this.add(add);
};
}
(function() {
const onPageLoaded = () => document.dispatchEvent(
new Event('page:loaded', {