How to use @jupyterlab/inspector - 10 common examples

To help you get started, we’ve selected a few @jupyterlab/inspector examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab / packages / inspector-extension / src / index.ts View on Github external
consoles.widgetAdded.connect((sender, parent) => {
      const session = parent.console.session;
      const rendermime = parent.console.rendermime;
      const connector = new KernelConnector({ session });
      const handler = new InspectionHandler({ connector, rendermime });

      // Associate the handler to the widget.
      handlers[parent.id] = handler;

      // Set the initial editor.
      let cell = parent.console.promptCell;
      handler.editor = cell && cell.editor;

      // Listen for prompt creation.
      parent.console.promptCellCreated.connect((sender, cell) => {
        handler.editor = cell && cell.editor;
      });

      // Listen for parent disposal.
      parent.disposed.connect(() => {
github jupyterlab / jupyterlab / packages / inspector-extension / src / index.ts View on Github external
notebooks.widgetAdded.connect((sender, parent) => {
      const session = parent.session;
      const rendermime = parent.content.rendermime;
      const connector = new KernelConnector({ session });
      const handler = new InspectionHandler({ connector, rendermime });

      // Associate the handler to the widget.
      handlers[parent.id] = handler;

      // Set the initial editor.
      let cell = parent.content.activeCell;
      handler.editor = cell && cell.editor;

      // Listen for active cell changes.
      parent.content.activeCellChanged.connect((sender, cell) => {
        handler.editor = cell && cell.editor;
      });

      // Listen for parent disposal.
      parent.disposed.connect(() => {
        delete handlers[parent.id];
github jupyterlab / jupyterlab-data-explorer / jupyterlab / packages / inspector-extension / src / index.ts View on Github external
notebooks.widgetAdded.connect((sender, parent) => {
      const session = parent.session;
      const rendermime = parent.rendermime;
      const connector = new KernelConnector({ session });
      const handler = new InspectionHandler({ connector, rendermime });

      // Associate the handler to the widget.
      handlers[parent.id] = handler;

      // Set the initial editor.
      let cell = parent.content.activeCell;
      handler.editor = cell && cell.editor;

      // Listen for active cell changes.
      parent.content.activeCellChanged.connect((sender, cell) => {
        handler.editor = cell && cell.editor;
      });

      // Listen for parent disposal.
      parent.disposed.connect(() => {
        delete handlers[parent.id];
github jupyterlab / jupyterlab / packages / inspector-extension / src / index.ts View on Github external
notebooks.widgetAdded.connect((sender, parent) => {
      const session = parent.session;
      const rendermime = parent.rendermime;
      const connector = new KernelConnector({ session });
      const handler = new InspectionHandler({ connector, rendermime });

      // Associate the handler to the widget.
      handlers[parent.id] = handler;

      // Set the initial editor.
      let cell = parent.content.activeCell;
      handler.editor = cell && cell.editor;

      // Listen for active cell changes.
      parent.content.activeCellChanged.connect((sender, cell) => {
        handler.editor = cell && cell.editor;
      });

      // Listen for parent disposal.
      parent.disposed.connect(() => {
        delete handlers[parent.id];
github jupyterlab / jupyterlab-data-explorer / jupyterlab / packages / inspector-extension / src / index.ts View on Github external
notebooks.widgetAdded.connect((sender, parent) => {
      const session = parent.session;
      const rendermime = parent.rendermime;
      const connector = new KernelConnector({ session });
      const handler = new InspectionHandler({ connector, rendermime });

      // Associate the handler to the widget.
      handlers[parent.id] = handler;

      // Set the initial editor.
      let cell = parent.content.activeCell;
      handler.editor = cell && cell.editor;

      // Listen for active cell changes.
      parent.content.activeCellChanged.connect((sender, cell) => {
        handler.editor = cell && cell.editor;
      });

      // Listen for parent disposal.
      parent.disposed.connect(() => {
github jupyterlab / jupyterlab / packages / inspector-extension / src / index.ts View on Github external
notebooks.widgetAdded.connect((sender, parent) => {
      const session = parent.session;
      const rendermime = parent.rendermime;
      const connector = new KernelConnector({ session });
      const handler = new InspectionHandler({ connector, rendermime });

      // Associate the handler to the widget.
      handlers[parent.id] = handler;

      // Set the initial editor.
      let cell = parent.content.activeCell;
      handler.editor = cell && cell.editor;

      // Listen for active cell changes.
      parent.content.activeCellChanged.connect((sender, cell) => {
        handler.editor = cell && cell.editor;
      });

      // Listen for parent disposal.
      parent.disposed.connect(() => {
github jupyterlab / jupyterlab-data-explorer / tests / test-inspector / src / inspector.spec.ts View on Github external
it('should default to `null`', () => {
        const widget = new InspectorPanel();
        expect(widget.source).to.be.null;
      });
github jupyterlab / jupyterlab / tests / test-inspector / src / inspector.spec.ts View on Github external
it('should construct a new inspector widget', () => {
        const widget = new InspectorPanel();
        expect(widget).to.be.an.instanceof(InspectorPanel);
      });
github jupyterlab / jupyterlab / tests / test-inspector / src / inspector.spec.ts View on Github external
it('should be a no-op if called more than once', () => {
        const widget = new InspectorPanel();
        expect(widget.isDisposed).to.equal(false);
        widget.dispose();
        widget.dispose();
        expect(widget.isDisposed).to.equal(true);
      });
    });
github jupyterlab / jupyterlab-data-explorer / tests / test-inspector / src / inspector.spec.ts View on Github external
it('should construct a new inspector widget', () => {
        const widget = new InspectorPanel();
        expect(widget).to.be.an.instanceof(InspectorPanel);
      });

@jupyterlab/inspector

JupyterLab - Code Inspector

BSD-3-Clause
Latest version published 15 days ago

Package Health Score

89 / 100
Full package analysis

Similar packages