Merge pull request #13971 from MoonE/remove-ie-compatibility
Remove more IE compatibility
This commit is contained in:
@@ -6,14 +6,10 @@ var version = obj.packageInfo.version;
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>OpenLayers v<?js= version ?> API - <?js= title ?></title>
|
<title>OpenLayers v<?js= version ?> API - <?js= title ?></title>
|
||||||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch"></script>
|
|
||||||
<script src="scripts/prettify/prettify.js"></script>
|
<script src="scripts/prettify/prettify.js"></script>
|
||||||
<script src="scripts/prettify/lang-css.js"></script>
|
<script src="scripts/prettify/lang-css.js"></script>
|
||||||
<script src="scripts/jquery.min.js"></script>
|
<script src="scripts/jquery.min.js"></script>
|
||||||
<script src="scripts/bootstrap.bundle.min.js"></script>
|
<script src="scripts/bootstrap.bundle.min.js"></script>
|
||||||
<!--[if lt IE 9]>
|
|
||||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
||||||
<![endif]-->
|
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ tags: "fullscreen, geolocation, orientation, mobile"
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
|
||||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" type="text/css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" type="text/css">
|
||||||
<link rel="stylesheet" href="./theme/ol.css" type="text/css">
|
<link rel="stylesheet" href="./theme/ol.css" type="text/css">
|
||||||
@@ -36,7 +35,6 @@ tags: "fullscreen, geolocation, orientation, mobile"
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script src="https://unpkg.com/elm-pep@1.0.6/dist/elm-pep.js"></script>
|
<script src="https://unpkg.com/elm-pep@1.0.6/dist/elm-pep.js"></script>
|
||||||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="map" class="map"></div>
|
<div id="map" class="map"></div>
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
|
||||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" type="text/css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" type="text/css">
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ cloak:
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
|
||||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
||||||
<title>Mobile full screen example</title>
|
<title>Mobile full screen example</title>
|
||||||
<link rel="stylesheet" href="../css/ol.css" type="text/css">
|
<link rel="stylesheet" href="../css/ol.css" type="text/css">
|
||||||
@@ -24,7 +23,6 @@ cloak:
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script src="https://unpkg.com/elm-pep@1.0.6/dist/elm-pep.js"></script>
|
<script src="https://unpkg.com/elm-pep@1.0.6/dist/elm-pep.js"></script>
|
||||||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="map" class="map"></div>
|
<div id="map" class="map"></div>
|
||||||
|
|||||||
@@ -3,13 +3,9 @@ layout: example.html
|
|||||||
title: Permalink
|
title: Permalink
|
||||||
shortdesc: Example on how to create permalinks.
|
shortdesc: Example on how to create permalinks.
|
||||||
docs: >
|
docs: >
|
||||||
In this example the <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history"
|
In this example the <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API"
|
||||||
target="_blank">HTML 5 History API</a> is used to update the browser URL
|
target="_blank">HTML 5 History API</a> is used to update the browser URL
|
||||||
with the current zoom-level, center and rotation when the map is moved.
|
with the current zoom-level, center and rotation when the map is moved.
|
||||||
Note that the History API is not supported in <a href="https://caniuse.com/history"
|
|
||||||
target="_blank">all browsers</a>, one might consider to use a <a
|
|
||||||
href="https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills#html5-history-api-pushstate-replacestate-popstate"
|
|
||||||
target="_blank">a polyfill</a>.
|
|
||||||
tags: "permalink, openstreetmap, history"
|
tags: "permalink, openstreetmap, history"
|
||||||
---
|
---
|
||||||
<div id="map" class="map"></div>
|
<div id="map" class="map"></div>
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
|
||||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
||||||
<script src="https://unpkg.com/lz-string@1.4.4/libs/lz-string.min.js"></script>
|
<script src="https://unpkg.com/lz-string@1.4.4/libs/lz-string.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/components/prism-core.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/components/prism-core.min.js"></script>
|
||||||
|
|||||||
@@ -36,16 +36,12 @@ export const GMLNS = 'http://www.opengis.net/gml';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A regular expression that matches if a string only contains whitespace
|
* A regular expression that matches if a string only contains whitespace
|
||||||
* characters. It will e.g. match `''`, `' '`, `'\n'` etc. The non-breaking
|
* characters. It will e.g. match `''`, `' '`, `'\n'` etc.
|
||||||
* 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
|
|
||||||
*
|
*
|
||||||
* @const
|
* @const
|
||||||
* @type {RegExp}
|
* @type {RegExp}
|
||||||
*/
|
*/
|
||||||
const ONLY_WHITESPACE_RE = /^[\s\xa0]*$/;
|
const ONLY_WHITESPACE_RE = /^\s*$/;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
|
|||||||
@@ -419,9 +419,6 @@ function defaultIconUrlFunction(href) {
|
|||||||
* geometry types, and into MultiPoint/MultiLineString/MultiPolygon if they are
|
* geometry types, and into MultiPoint/MultiLineString/MultiPolygon if they are
|
||||||
* all of the same type.
|
* 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
|
* @api
|
||||||
*/
|
*/
|
||||||
class KML extends XMLFeature {
|
class KML extends XMLFeature {
|
||||||
|
|||||||
@@ -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:
|
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
|
* Correct treatment of XML namespaces
|
||||||
* Robust handling of errors
|
* Robust handling of errors
|
||||||
* Modular design to promote the re-use of parsers
|
* 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}
|
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`
|
## `ol/xml`
|
||||||
|
|
||||||
|
|||||||
@@ -87,10 +87,6 @@ export class DragAndDropEvent extends Event {
|
|||||||
* @classdesc
|
* @classdesc
|
||||||
* Handles input of vector data by drag and drop.
|
* 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
|
* @api
|
||||||
*
|
*
|
||||||
* @fires DragAndDropEvent
|
* @fires DragAndDropEvent
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ function verifyBrokenDiagonalRendering(data, offset) {
|
|||||||
* Determines if the current browser configuration can render triangular clip regions correctly.
|
* 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.
|
* 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
|
* 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
|
* result. I suppose that it is conceivably possible that a browser might flip modes while the app is
|
||||||
* running, but lets hope not.
|
* running, but lets hope not.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -246,14 +246,7 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// test attribute namespace
|
// test attribute namespace
|
||||||
// we do not care about the difference between an empty string and
|
if (node1Attr[name].namespaceURI !== node2Attr[name].namespaceURI) {
|
||||||
// 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)
|
|
||||||
) {
|
|
||||||
errors.push(
|
errors.push(
|
||||||
'namespaceURI attribute test failed for: ' +
|
'namespaceURI attribute test failed for: ' +
|
||||||
node1.nodeName +
|
node1.nodeName +
|
||||||
|
|||||||
Reference in New Issue
Block a user