I have the metamask extension. When I do typeof(window.ethereum) in the console for a chrome tab, I get the type as object. However if I open mywebpage.html in a tab, which is just a heading around:
<script type="text/javascript"> document.write(typeof(window.ethereum)); </script>
then this typeof is 'undefined', either on the page or on the console.
I want to write a webpage that accesses metamask, how do I do that?