PageSourceSearch

https://klimamap.de/ol10/has.js

js klimamap.de collected 2026-10-05 02:47:04 UTC 2,204 bytes, 90 lines download raw bytes

vendor: 2,204 bytes, lines 1-90
1/**
2 * @module ol/has
3 */
4
5const ua =
6  typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined'
7    ? navigator.userAgent.toLowerCase()
8    : '';
9
10/**
11 * User agent string says we are dealing with Safari as browser.
12 * @type {boolean}
13 */
14export const SAFARI = ua.includes('safari') && !ua.includes('chrom');
15
16/**
17 * https://bugs.webkit.org/show_bug.cgi?id=237906
18 * @type {boolean}
19 */
20export const SAFARI_BUG_237906 =
21  SAFARI &&
22  (ua.includes('version/15.4') ||
23    /cpu (os|iphone os) 15_4 like mac os x/.test(ua));
24
25/**
26 * User agent string says we are dealing with a WebKit engine.
27 * @type {boolean}
28 */
29export const WEBKIT = ua.includes('webkit') && !ua.includes('edge');
30
31/**
32 * User agent string says we are dealing with a Mac as platform.
33 * @type {boolean}
34 */
35export const MAC = ua.includes('macintosh');
36
37/**
38 * The ratio between physical pixels and device-independent pixels
39 * (dips) on the device (`window.devicePixelRatio`).
40 * @const
41 * @type {number}
42 * @api
43 */
44export const DEVICE_PIXEL_RATIO =
45  typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;
46
47/**
48 * The execution context is a worker with OffscreenCanvas available.
49 * @const
50 * @type {boolean}
51 */
52export const WORKER_OFFSCREEN_CANVAS =
53  typeof WorkerGlobalScope !== 'undefined' &&
54  typeof OffscreenCanvas !== 'undefined' &&
55  self instanceof WorkerGlobalScope; //eslint-disable-line
56
57/**
58 * Image.prototype.decode() is supported.
59 * @type {boolean}
60 */
61export const IMAGE_DECODE =
62  typeof Image !== 'undefined' && Image.prototype.decode;
63
64/**
65 * createImageBitmap() is supported.
66 * @type {boolean}
67 */
68export const CREATE_IMAGE_BITMAP = typeof createImageBitmap === 'function';
69
70/**
71 * @type {boolean}
72 */
73export const PASSIVE_EVENT_LISTENERS = (function () {
74  let passive = false;
75  try {
76    const options = Object.defineProperty({}, 'passive', {
77      get: function () {
78        passive = true;
79      },
80    });
81
82    // @ts-ignore Ignore invalid event type '_'
83    window.addEventListener('_', null, options);
84    // @ts-ignore Ignore invalid event type '_'
85    window.removeEventListener('_', null, options);
86  } catch {
87    // passive not supported
88  }
89  return passive;
90})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.