title: TypeError: browser is undefined (Web Extension Messaging)
body: <p>I am trying to communicate my web page script with my content script of my web extension with the code below</p>
  
  <p><strong>Web Page Script</strong></p>
  
  <pre><code>const browser = window.browser || window.chrome;
  browser.runtime.sendMessage(message,
       function (response) {
            console.log(response);
       }
  );
  </code></pre>
  
  <p>However, I keep getting the error <code>TypeError: browser is undefined</code>. The same goes if I use <code>chrome.runtime.sendMessage()</code> instead.</p>
  
  <p>How am I supposed to use this method?</p>