Browse Source

Add the notebook panel .notebook attribute to ease the transition.

Jason Grout 7 years ago
parent
commit
672e843c24
1 changed files with 10 additions and 0 deletions
  1. 10 0
      packages/notebook/src/panel.ts

+ 10 - 0
packages/notebook/src/panel.ts

@@ -150,6 +150,16 @@ class NotebookPanel extends DocumentWidget<Notebook, INotebookModel> {
    */
   readonly content: Notebook;
 
+  /**
+   * The notebook used by the widget.
+   *
+   * #### Notes
+   * This attribute is deprecated. Use `.content` instead.
+   */
+  get notebook(): Notebook {
+    return this.content;
+  }
+
   /**
    * The model for the widget.
    */