title: How do I run code on DOM ready in Greasemonkey 4?
body: <p>With the update to Firefox 57 and Greasemonkey 4 a number of my userscripts broke. In some scripts I used:</p>
  
  <pre><code>document.addEventListener('DOMContentLoaded', doStuff, false);
  </code></pre>
  
  <p>This no longer works in Greasemonkey. What is the proper way to add an <code>DOMContentLoaded</code> event now?</p>
  
  <p>P.S. I checked that at the time of registering the event, DOM is still not ready.</p>