Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ import { createBridge } from 'jupyter-iframe-commands-host';
// Initialize the bridge with your iframe ID
const commandBridge = createBridge({ iframeId: 'your-jupyter-iframe-id' });

// Wait for the bridge to be ready before executing commands
await commandBridge.ready;

// Execute JupyterLab commands
// Example: Toggle the left sidebar
await commandBridge.execute('application:toggle-left-area');
Expand Down Expand Up @@ -139,6 +142,9 @@ import { createBridge, createProxy } from 'jupyter-iframe-commands-host';

const commandBridge = createBridge({ iframeId: 'jupyterlab' });

// Wait for the bridge to be ready
await commandBridge.ready;

const kernelStatus = async ({ displayName, isBusy }) => {
console.log('Received kernel status update from the iframe');
console.log('Display Name:', displayName);
Expand Down
Loading