Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <div id="log"></div>
</body>
</html>
 
let queries = [
  '(pointer:fine)',
  '(pointer:coarse)',
  '(hover: none)',
  '(any-pointer:fine)',
  '(any-pointer:coarse)',
  '(any-hover: none)',
];
let mqs = [];
for (let i = 0; i < queries.length; i++) {
  mqs.push(window.matchMedia(queries[i]));
  mqs[i].addListener(update);
}
function update() {
  let text = '';
  for (let i = 0; i < queries.length; i++) {
    text += queries[i] + ': ';
    text += mqs[i].matches + '\n';
  }
  document.getElementById('log').textContent = text;
}
update();
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
flackrpro
0viewers