Explorar o código

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

Jason Grout %!s(int64=7) %!d(string=hai) anos
pai
achega
672e843c24
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  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.
    */