This is a shim for Element.prototype.insertAdjacentElement
, which is supported all major browsers except Firefox.
Example: https://jsfiddle.net/kafene/s6Lweg5k/
if ("undefined" === typeof (Element.prototype.insertAdjacentElement)) {
Object.defineProperty(Element.prototype, "insertAdjacentElement", {
enumerable: false,
writable: true,
configurable: true,