瀏覽代碼

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

Jason Grout 7 年之前
父節點
當前提交
672e843c24
共有 1 個文件被更改,包括 10 次插入0 次删除
  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.
    */