Trying to access Class names in global context
StackOverflow question:
https://stackoverflow.com/questions/66287396/accessing-api-class-names-in-global-context
HTML
<html>
<head>
<title>Accessing API Classes</title>
</head>
<body>
<h2>MWE for attempting to access API class names</h2>
<p>I can access various classes from DevTools and programmatically
yet I can't see them as attributes of <code>window</code> object.</p>
<p>Turn on DevTools to see this example</p>
<script>
console.log('typeof window.ArrayBuffer:',
typeof window.ArrayBuffer);
console.log("window.hasOwnProperty('ArrayBuffer'):",
window.hasOwnProperty('ArrayBuffer'));
let c = 0;
for (let n in window) {
//console.log(n);
if (n == 'ArrayBuffer') {
console.log('FOUND: ArrayBuffer');
}
c++;
}
console.log(c + ' attributes checked')
</script>
</body>
</html>