Include Polyfill for Internet Explorer directly instead of using a CDN. master
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 21 Aug 2021 08:17:02 +0000 (10:17 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 21 Aug 2021 08:17:02 +0000 (10:17 +0200)
https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,fetch

# Conflicts:
# extension.json

extension.json
vendor/polyfill.min.js [new file with mode: 0644]
wrmap.body.php

index 97c6a05f0f0662fa11ed08c042f72da792c40b83..578e0c3504d82c7c27456aec4c7ec5f084c8494e 100644 (file)
@@ -18,7 +18,8 @@
                "ext.wrmap": {
                        "scripts": [
                                "wrmap.js",
                "ext.wrmap": {
                        "scripts": [
                                "wrmap.js",
-                               "vendor/ol.js"
+                               "vendor/ol.js",
+                               "vendor/polyfill.min.js"
                        ],
                        "styles": [
                                "wrmap.css",
                        ],
                        "styles": [
                                "wrmap.css",
diff --git a/vendor/polyfill.min.js b/vendor/polyfill.min.js
new file mode 100644 (file)
index 0000000..4729194
--- /dev/null
@@ -0,0 +1,3 @@
+/* Disable minification (remove `.min` from URL path) for more info */
+
+(function(undefined) {}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
\ No newline at end of file
index 8d0d966cb3d5bfa6d54f9dafb366b640dc41954d..bff6ba34bad492bdfe12a10365e107cb4881cf0c 100644 (file)
@@ -399,8 +399,6 @@ class WrBaseMap {
                assert(in_array($tagname, array('wrmap', 'wrgmap')));
 
                $parserOutput = $parser->getOutput();
                assert(in_array($tagname, array('wrmap', 'wrgmap')));
 
                $parserOutput = $parser->getOutput();
-               // Polyfill für Internet Explorer
-               $parserOutput->addHeadItem('<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,fetch"></script>', 'polyfill_ie');
                $parserOutput->addModules('ext.wrmap');
 
                // append all sledruns as icon
                $parserOutput->addModules('ext.wrmap');
 
                // append all sledruns as icon