PageSourceSearch

https://egr.am/compatTest.js

js egr.am collected 2026-10-09 17:18:32 UTC 927 bytes, 25 lines download raw bytes

1function compatTest() {
2  var hasPromise = typeof Promise !== 'undefined';
3  var hasWebSockets = typeof WebSocket !== 'undefined';
4  var hasWebCrypto = window.crypto && typeof window.crypto.subtle !== 'undefined';
5  var hasObjectFromEntries = typeof Object.fromEntries !== 'undefined';
6
7  var isCompatible = hasPromise && hasWebSockets && hasWebCrypto && hasObjectFromEntries;
8
9  if (isCompatible || (window.localStorage && window.localStorage.getItem('tt-ignore-compat'))) {
10    window.isCompatTestPassed = true;
11    return;
12  }
13
14  if (window.console && console.warn) {
15    console.warn('Compatibility test report:');
16    console.warn('Promise', hasPromise);
17    console.warn('WebSocket', hasWebSockets);
18    console.warn('WebCrypto', hasWebCrypto);
19    console.warn('Object.fromEntries', hasObjectFromEntries);
20  }
21
22  document.body.innerHTML = '<iframe src="./unsupported.html" width="100%" height="100%">';
23}
24
25compatTest();

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.