From 22a728a5fed472c9b6c0d60c7b18d485d29d05b8 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 12 Aug 2016 10:21:24 +0300 Subject: juick-www: Element.remove polyfill --- juick-www/src/main/static/scripts.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'juick-www/src/main/static/scripts.js') diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js index 876fa6d1..0c701359 100644 --- a/juick-www/src/main/static/scripts.js +++ b/juick-www/src/main/static/scripts.js @@ -2,6 +2,13 @@ var autosize = require('autosize'); require('whatwg-fetch'); require('element-closest'); require('classlist.js'); +if (!('remove' in Element.prototype)) { // Firefox <23 + Element.prototype.remove = function() { + if (this.parentNode) { + this.parentNode.removeChild(this); + } + }; +} NodeList.prototype.forEach = Array.prototype.forEach; HTMLCollection.prototype.forEach = Array.prototype.forEach; -- cgit v1.2.3