MCPcopy Create free account
hub / github.com/Sandpack/nodebox-runtime / constructor

Method constructor

packages/nodebox/src/Nodebox.ts:44–54  ·  view source on GitHub ↗
(private readonly options: ChannelOptions)

Source from the content-addressed store, hash-verified

42 private previewApi: PreviewApi = null as any;
43
44 constructor(private readonly options: ChannelOptions) {
45 invariant(
46 this.options.iframe,
47 'Failed to create a Nodebox: expected "iframe" argument to be a reference to an <iframe> element but got %j',
48 this.options.iframe
49 );
50
51 this.url = this.options.runtimeUrl || DEFAULT_RUNTIME_URL;
52
53 this.isConnected = false;
54 }
55
56 /**
57 * Connect to the deployed Node Emulator instance.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected