Fix for IE11
This commit is contained in:
@@ -33,6 +33,8 @@ overviewer.util = {
|
|||||||
*/
|
*/
|
||||||
'initialize': function() {
|
'initialize': function() {
|
||||||
//overviewer.util.initializeClassPrototypes();
|
//overviewer.util.initializeClassPrototypes();
|
||||||
|
overviewer.util.initializePolyfills();
|
||||||
|
|
||||||
document.getElementById('NoJSWarning').remove();
|
document.getElementById('NoJSWarning').remove();
|
||||||
|
|
||||||
|
|
||||||
@@ -222,6 +224,21 @@ overviewer.util = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/** Any polyfills needed to improve browser compatibility
|
||||||
|
*/
|
||||||
|
'initializePolyfills': function() {
|
||||||
|
// From https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove
|
||||||
|
// IE is missing this
|
||||||
|
if (!('remove' in Element.prototype)) {
|
||||||
|
Element.prototype.remove = function() {
|
||||||
|
if (this.parentNode) {
|
||||||
|
this.parentNode.removeChild(this);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This adds some methods to these classes because Javascript is stupid
|
* This adds some methods to these classes because Javascript is stupid
|
||||||
|
|||||||
Reference in New Issue
Block a user