Sfoglia il codice sorgente

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

Jason Grout 7 anni fa
parent
commit
672e843c24
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  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.
    */