From a7acb0278df7c3ca98a2bccb6c2c31d34a2eceee Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 7 Aug 2020 11:14:07 +0100 Subject: [PATCH] Element.remove polyfill --- src/main-legacy.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main-legacy.js b/src/main-legacy.js index 06faa75d..e21d4ca5 100644 --- a/src/main-legacy.js +++ b/src/main-legacy.js @@ -19,6 +19,12 @@ limitations under the License. import "core-js/stable"; import "regenerator-runtime/runtime"; import "mdn-polyfills/Element.prototype.closest"; +// TODO: contribute this to mdn-polyfills +if (!Element.prototype.remove) { + Element.prototype.remove = function remove() { + this.parentNode.removeChild(this); + }; +} import {xhrRequest} from "./matrix/net/request/xhr.js"; import {SessionContainer} from "./matrix/SessionContainer.js";