* available since Chrome 27
(ack-output tab-id pid)
Called from |onProcessOutput| when the event is dispatched to terminal extension. Observing the terminal process output will be paused after |onProcessOutput| is dispatched until this method is called.
|tab-id| - Tab ID from |onProcessOutput| event. |pid| - The id of the process to which |onProcessOutput| was dispatched.
Called from |onProcessOutput| when the event is dispatched to terminal extension. Observing the terminal process output will be paused after |onProcessOutput| is dispatched until this method is called. |tab-id| - Tab ID from |onProcessOutput| event. |pid| - The id of the process to which |onProcessOutput| was dispatched.
(close-terminal-process pid)
Closes previously opened process.
|pid| - Process id of the process we want to close.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [success] where:
|success| - ?
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Closes previously opened process. |pid| - Process id of the process we want to close. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [success] where: |success| - ? In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(on-terminal-resize pid width height)
Notify the process with the id id that terminal window size has changed.
|pid| - The id of the process. |width| - New window width (as column count). |height| - New window height (as row count).
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [success] where:
|success| - ?
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Notify the process with the id id that terminal window size has changed. |pid| - The id of the process. |width| - New window width (as column count). |height| - New window height (as row count). This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [success] where: |success| - ? In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(open-terminal-process process-name)
(open-terminal-process process-name args)
Starts new process.
|process-name| - Name of the process to open. May be 'crosh' or 'vmshell'. |args| - Command line arguments to pass to the process.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [pid] where:
|pid| - Id of the launched process.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Starts new process. |process-name| - Name of the process to open. May be 'crosh' or 'vmshell'. |args| - Command line arguments to pass to the process. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [pid] where: |pid| - Id of the launched process. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(send-input pid input)
Sends input that will be routed to stdin of the process with the specified id.
|pid| - The id of the process to which we want to send input. |input| - Input we are sending to the process.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [success] where:
|success| - ?
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Sends input that will be routed to stdin of the process with the specified id. |pid| - The id of the process to which we want to send input. |input| - Input we are sending to the process. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [success] where: |success| - ? In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.app.terminal-private namespace.
Taps all valid non-deprecated events in chromex.app.terminal-private namespace.
(tap-on-process-output-events channel & args)
Fired when an opened process writes something to its output. Observing further process output will be blocked until |ackOutput| for the terminal is called. Internally, first event argument will be ID of the tab that contains terminal instance for which this event is intended. This argument will be stripped before passing the event to the extension.
Events will be put on the |channel| with signature [::on-process-output [pid type text]] where:
|pid| - Id of the process from which the output came. |type| - Type of the output stream from which output came. When process exits, output type will be set to exit |text| - Text that was written to the output stream.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
Fired when an opened process writes something to its output. Observing further process output will be blocked until |ackOutput| for the terminal is called. Internally, first event argument will be ID of the tab that contains terminal instance for which this event is intended. This argument will be stripped before passing the event to the extension. Events will be put on the |channel| with signature [::on-process-output [pid type text]] where: |pid| - Id of the process from which the output came. |type| - Type of the output stream from which output came. When process exits, output type will be set to exit |text| - Text that was written to the output stream. Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close