BP reference update (first draft)#413
Conversation
Co-authored-by: Copilot <copilot@github.com>
Deploying labs-browserpod-previews with
|
| Latest commit: |
6b8ce2c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8433ebbb.labs-browserpod-previews.pages.dev |
| Branch Preview URL: | https://browserpod-reference-updates.labs-browserpod-previews.pages.dev |
| - **nodeVersion (`string`, _optional_)** - The version of node to use. Currently only "22" is allowed. | ||
| - **nodeVersion (`string`, _optional_)** - The version of Node.js to use. Currently only "22" is allowed. | ||
| - **storageKey (`string`, _optional_)** - An arbitrary string used to support multiple pods on the same origin or multiple tabs in parallel. For example, `boot({ apiKey: "...", storageKey: "vite" })` and `boot({ apiKey: "...", storageKey: "app-12345" })` allocate two completely independent disks. | ||
| - **userImage (`string`, _optional_)** - A URL pointing to a custom WebAssembly binary to load into the pod environment. When specified, this WebAssembly module will be loaded and made available within the pod instead of using the default environment. |
There was a problem hiding this comment.
Not a WebAssembly binary, it's an ext2 image.
| @@ -0,0 +1,22 @@ | |||
| --- | |||
| title: onOpen | |||
| description: Set up a callback that will be invoked when a file or resource is opened in the pod | |||
There was a problem hiding this comment.
file or URL
Please also clarify that this maps to the use of xdg-open utility.
GabrielaReyna
left a comment
There was a problem hiding this comment.
Good job documenting these!
In addition to my comments on the code, I will add some bullet points as to-do's:
- Please document
TerminalandProcess, even if they are opaque or minimalistic. Please sync with Yuri and Alessandro for any questions. These are first-class, so they go at the same level asBinaryFile,TextFileetc. - Please add links where
TerminalandProcessare mentioned in the text, referring to their documented page. - There is a nice explanatory page for
BinaryFile, this is a good chance to do something similar forBrowserPodin the reference, given an instance of BrowserPod we call it a "Pod" and it can be confusing for some users. This is an opportunity to link to this page when we call it like so.
| @@ -0,0 +1,22 @@ | |||
| --- | |||
| title: onOpen | |||
There was a problem hiding this comment.
Let's sort the reference in alphabetical order, or any other order that makes sense. For example, onPortal and onOpen are far apart in the API list, and both setup a callback. The same for the "create" APIs
|
|
||
| ## Parameters | ||
|
|
||
| - **opts (object)** - Terminal configuration options passed as an object. |
There was a problem hiding this comment.
| - **opts (object)** - Terminal configuration options passed as an object. | |
| - **opts (_object_)** - Terminal configuration options passed as an object. |
|
|
||
| - **cols (`number`, _optional_)** - The number of columns (width) for the terminal display. If not specified, a default width will be used. | ||
| - **rows (`number`, _optional_)** - The number of rows (height) for the terminal display. If not specified, a default height will be used. | ||
| - **onOutput** (`function(buffer: Uint8Array | ArrayBuffer, vt?: unknown) => void`) - Callback function invoked whenever the terminal produces output. The buffer contains the raw terminal data, and vt contains optional VT escape sequence information. |
There was a problem hiding this comment.
| - **onOutput** (`function(buffer: Uint8Array | ArrayBuffer, vt?: unknown) => void`) - Callback function invoked whenever the terminal produces output. The buffer contains the raw terminal data, and vt contains optional VT escape sequence information. | |
| - **onOutput (`function(buffer: Uint8Array | ArrayBuffer, vt?: unknown) => void`)** - Callback function invoked whenever the terminal produces output. The buffer contains the raw terminal data, and vt contains optional VT escape sequence information. |
|
|
||
| ## Returns | ||
|
|
||
| `createCustomTerminal` returns a [Promise] which is resolved when the terminal has been created successfully. The promise resolves to a `Terminal` object that can be used to interact with the custom terminal. |
There was a problem hiding this comment.
Please link Terminal to its page once documented
No description provided.