From 5c4339f367522abbd94585afaf1dbaf9d0be5c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Fri, 12 Aug 2022 00:19:24 +0200 Subject: [PATCH] Remove more IE compatibility --- config/jsdoc/api/template/tmpl/layout.tmpl | 4 ---- examples/geolocation-orientation.html | 2 -- examples/index.html | 1 - examples/mobile-full-screen.html | 2 -- examples/permalink.html | 6 +----- examples/templates/example.html | 1 - src/ol/format/GMLBase.js | 8 ++------ src/ol/format/KML.js | 3 --- src/ol/format/readme.md | 3 +-- src/ol/interaction/DragAndDrop.js | 4 ---- src/ol/reproj.js | 2 +- test/browser/test-extensions.js | 9 +-------- 12 files changed, 6 insertions(+), 39 deletions(-) diff --git a/config/jsdoc/api/template/tmpl/layout.tmpl b/config/jsdoc/api/template/tmpl/layout.tmpl index ac3c9ae506..2a1637ac4a 100644 --- a/config/jsdoc/api/template/tmpl/layout.tmpl +++ b/config/jsdoc/api/template/tmpl/layout.tmpl @@ -6,14 +6,10 @@ var version = obj.packageInfo.version; OpenLayers v<?js= version ?> API - <?js= title ?> - - diff --git a/examples/geolocation-orientation.html b/examples/geolocation-orientation.html index 1d418494ec..d2285ea893 100644 --- a/examples/geolocation-orientation.html +++ b/examples/geolocation-orientation.html @@ -8,7 +8,6 @@ tags: "fullscreen, geolocation, orientation, mobile" - @@ -36,7 +35,6 @@ tags: "fullscreen, geolocation, orientation, mobile" } -
diff --git a/examples/index.html b/examples/index.html index 3006cd5e7c..df110182be 100644 --- a/examples/index.html +++ b/examples/index.html @@ -2,7 +2,6 @@ - diff --git a/examples/mobile-full-screen.html b/examples/mobile-full-screen.html index 1145dd31e7..32b73f4215 100644 --- a/examples/mobile-full-screen.html +++ b/examples/mobile-full-screen.html @@ -11,7 +11,6 @@ cloak: - Mobile full screen example @@ -24,7 +23,6 @@ cloak: } -
diff --git a/examples/permalink.html b/examples/permalink.html index 4d93bbfb30..d1cfe730f6 100644 --- a/examples/permalink.html +++ b/examples/permalink.html @@ -3,13 +3,9 @@ layout: example.html title: Permalink shortdesc: Example on how to create permalinks. docs: > - In this example the HTML 5 History API is used to update the browser URL with the current zoom-level, center and rotation when the map is moved. - Note that the History API is not supported in all browsers, one might consider to use a a polyfill. tags: "permalink, openstreetmap, history" ---
diff --git a/examples/templates/example.html b/examples/templates/example.html index 164da44fdb..1ba448f08a 100644 --- a/examples/templates/example.html +++ b/examples/templates/example.html @@ -2,7 +2,6 @@ - diff --git a/src/ol/format/GMLBase.js b/src/ol/format/GMLBase.js index 33abc0cc39..b7fb69c539 100644 --- a/src/ol/format/GMLBase.js +++ b/src/ol/format/GMLBase.js @@ -36,16 +36,12 @@ export const GMLNS = 'http://www.opengis.net/gml'; /** * A regular expression that matches if a string only contains whitespace - * characters. It will e.g. match `''`, `' '`, `'\n'` etc. The non-breaking - * space (0xa0) is explicitly included as IE doesn't include it in its - * definition of `\s`. - * - * Information from `goog.string.isEmptyOrWhitespace`: https://github.com/google/closure-library/blob/e877b1e/closure/goog/string/string.js#L156-L160 + * characters. It will e.g. match `''`, `' '`, `'\n'` etc. * * @const * @type {RegExp} */ -const ONLY_WHITESPACE_RE = /^[\s\xa0]*$/; +const ONLY_WHITESPACE_RE = /^\s*$/; /** * @typedef {Object} Options diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index d7d8175fdc..b58eecdd9b 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -419,9 +419,6 @@ function defaultIconUrlFunction(href) { * geometry types, and into MultiPoint/MultiLineString/MultiPolygon if they are * all of the same type. * - * Note that the KML format uses the URL() constructor. Older browsers such as IE - * which do not support this will need a URL polyfill to be loaded before use. - * * @api */ class KML extends XMLFeature { diff --git a/src/ol/format/readme.md b/src/ol/format/readme.md index 7c048363c6..c473182468 100644 --- a/src/ol/format/readme.md +++ b/src/ol/format/readme.md @@ -23,7 +23,6 @@ The document ends with guidelines for implementing a new format. The `ol/xml` namespace contains a number of useful functions for parsing XML documents. All code in OpenLayers that reads data from XML documents should use it. It has several features: -* Browser support back to IE9 * Correct treatment of XML namespaces * Robust handling of errors * Modular design to promote the re-use of parsers @@ -42,7 +41,7 @@ The `ol/format/XML` class includes a number of methods for reading arrays of fea read{Features,Feature,Geometry}From{Document,Node} -`Document`s are top-level XML document objects, `Node`s are children of the top-level XML document object. In modern browsers `Document` is a subclass of `Node`, and inherits all of `Node`'s methods. In IE, this is not the case: `Document` is not a subclass of `Node`, and `Document` only has some of `Node`'s functionality. The distinction between the two is therefore necessary. +`Document`s are top-level XML document objects, `Node`s are children of the top-level XML document object. In modern browsers `Document` is a subclass of `Node`, and inherits all of `Node`'s methods. ## `ol/xml` diff --git a/src/ol/interaction/DragAndDrop.js b/src/ol/interaction/DragAndDrop.js index 2c6a4d964f..32f8b03852 100644 --- a/src/ol/interaction/DragAndDrop.js +++ b/src/ol/interaction/DragAndDrop.js @@ -87,10 +87,6 @@ export class DragAndDropEvent extends Event { * @classdesc * Handles input of vector data by drag and drop. * - * Note that the DragAndDrop interaction uses the TextDecoder() constructor if the supplied - * combination of formats read both text string and ArrayBuffer sources. Older browsers such - * as IE which do not support this will need a TextDecoder polyfill to be loaded before use. - * * @api * * @fires DragAndDropEvent diff --git a/src/ol/reproj.js b/src/ol/reproj.js index 3d54c1c3de..88817e8f41 100644 --- a/src/ol/reproj.js +++ b/src/ol/reproj.js @@ -64,7 +64,7 @@ function verifyBrokenDiagonalRendering(data, offset) { * Determines if the current browser configuration can render triangular clip regions correctly. * This value is cached so the function is only expensive the first time called. * Firefox on Windows (as of now) does not if HWA is enabled. See https://bugzilla.mozilla.org/show_bug.cgi?id=1606976 - * IE also doesn't. Chrome works, and everything seems to work on OSX and Android. This function caches the + * Chrome works, and everything seems to work on OSX and Android. This function caches the * result. I suppose that it is conceivably possible that a browser might flip modes while the app is * running, but lets hope not. * diff --git a/test/browser/test-extensions.js b/test/browser/test-extensions.js index e530ee3e9f..555cfc9a92 100644 --- a/test/browser/test-extensions.js +++ b/test/browser/test-extensions.js @@ -246,14 +246,7 @@ break; } // test attribute namespace - // we do not care about the difference between an empty string and - // null for namespaceURI some tests will fail in IE9 otherwise - // see also - // https://docs.microsoft.com/en-us/openspecs/ie_standards/ms-dom2c/d6ad7f24-25f4-4ab0-a36b-32ddc08f413c - if ( - (node1Attr[name].namespaceURI || null) !== - (node2Attr[name].namespaceURI || null) - ) { + if (node1Attr[name].namespaceURI !== node2Attr[name].namespaceURI) { errors.push( 'namespaceURI attribute test failed for: ' + node1.nodeName +