title: Firefox WebExtension importing Services
body: <p>I am feeling overwhelmed by so many different approaches, guides, and yet none I tried work for me. Please connect at least some of the dots for me...</p>
  
  <p>My objective is to find a window object in background script of Firefox WebExtension.</p>
  
  <p>Problem, I cannot import <code>Services</code> library to use it for finding a <code>window</code> object.</p>
  
  <p>Two methods I tried:</p>
  
  <ol>
  <li><code>Components.utils.import("resource://gre/modules/Services.jsm");</code> Gives a warning that <code>Components</code> is depricated, and an error: <code>Components.utils</code> is undefined.</li>
  <li><code>const { Cu } = require("chrome");
  let Services = Cu.import("resource://gre/modules/Services.jsm");</code> Throws an error that <code>require</code> is undefined.</li>
  </ol>
  
  <p>That is a background script, point me to the right direction how to import the proper libraries/interfaces I need to work with?</p>