title: How to access notebook from JupyterLab extension activate method?
body: <p>Some time ago I wrote an extension for JupyterNotebook. Now I want to adapt it for JupyterLab.</p>
  <p>In order to access the currently opend notebook I used:</p>
  <pre><code>var notebook = Jupyter.notebook;
  var firstCell = notebook.get_cells()[0];
  </code></pre>
  <p>=&gt; What is the corresponding code for Jupyterlab?</p>
  <pre><code>module.exports = [{
      id: 'jupyterlab_workspace_module',
      autoStart: true,
      activate: function(app) {
         //app.notebook is not defined
         var notebook = getNotebook(app); // &lt;= how to implement this?
      }
  }];
  </code></pre>