[meta:edit-log]: # "2020/11/01,2020/12/06"
[meta:title]: # "Browser Status"
[meta:keywords]: # "browser, status, info, tool, utility"
[meta:description]: # "Common browser info from JS, DOM, and CSS, should work on browsers like IE11 or better."


<pre id="status"></pre>

<script>
function it (title, value) {
  if (value === undefined) value = title;
  try { value = eval(value) } catch (e) { value = e }
  value = '<' + Object.prototype.toString.call(value).slice(8, -1) + '> ' + String(value);
  return '[' + title + '] ' + value;
}
var codeTag = document.createElement('code');
codeTag.innerText = [
  it('JSON'),
  it('Promise'),
  it('localStorage.length'),
  it('caches'),
  it('crypto'),
  it('crypto.subtle'),
  it('navigator.userAgent'),
  it('navigator.onLine'),
  it('navigator.vendor'),
  it('navigator.language'),
  it('navigator.languages'),
  it('navigator.storage'),
  it('navigator.serviceWorker'),
  it('navigator.plugins.length'),
  it('navigator.javaEnabled()'),
  it('devicePixelRatio'),
  it('matchMedia("(min-width: 600px)").matches'),
  it('matchMedia("(max-width: 600px)").matches'),
  it('matchMedia("(pointer: fine)").matches'),
  it('matchMedia("(pointer: coarse)").matches'),
  it('matchMedia("(prefers-color-scheme: dark)").matches'),
  it('matchMedia("(prefers-color-scheme: light)").matches'),
  it('matchMedia("(orientation: portrait)").matches'),
  it('matchMedia("(orientation: landscape)").matches'),
  it('matchMedia("(max-aspect-ratio: 9/16)").matches'),
  it('matchMedia("(min-aspect-ratio: 4/3)").matches'),
  it('matchMedia("(min-resolution: 72dpi)").matches'),
  it('matchMedia("(min-resolution: 96dpi)").matches'),
  it('matchMedia("(min-resolution: 1x)").matches'),
  it('matchMedia("(min-resolution: 97dpi)").matches'),
  it('matchMedia("(min-resolution: 1.5x)").matches'),
  it('matchMedia("(min-resolution: 2x)").matches'),
  it('matchMedia("(min-resolution: 2.5x)").matches'),
  it('matchMedia("(min-resolution: 3x)").matches'),
  it('var a = 1; a'),
  it('let a = 1; a'),
  it('const a = 1; a'),
  it('() => {}'),
  it('async () => {}'),
  it('([ ...[] ])'),
  it('({ ...{} })'),
  it('new Date().toISOString()')
].join('\n');
document.getElementById('status').appendChild(codeTag);
</script>