瀏覽代碼

Update output area widget

Steven Silvester 8 年之前
父節點
當前提交
2214b8e0f8
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      src/notebook/output-area/widget.ts

+ 11 - 0
src/notebook/output-area/widget.ts

@@ -13,6 +13,10 @@ import {
   JSONObject
 } from 'phosphor/lib/algorithm/json';
 
+import {
+  ISequence
+} from 'phosphor/lib/algorithm/sequence';
+
 import {
   Message
 } from 'phosphor/lib/core/messaging';
@@ -192,6 +196,13 @@ class OutputAreaWidget extends Widget {
    */
   modelDisposed: ISignal<this, void>;
 
+  /**
+   * A read-only sequence of the widgets in the output area.
+   */
+  get widgets(): ISequence<OutputWidget> {
+    return (this.layout as PanelLayout).widgets as ISequence<OutputWidget>;
+  }
+
   /**
    * The model for the widget.
    */