Liking cljdoc? Tell your friends :D

portal.api


clearclj/s

(clear)
(clear portal)

Clear all values.

Clear all values.
sourceraw docstring

closeclj/s

(close)
(close portal)

Close all current inspector windows.

  • portal: Portal session returned via portal.api/open.
Close all current inspector windows.

- portal: Portal session returned via `portal.api/open`.
sourceraw docstring

docsclj/s

(docs)
(docs options)

Open portal docs.

  • options: see portal.api/open for options.
Open portal docs.

- options: see `portal.api/open` for options.
sourceraw docstring

eval-strclj/s

(eval-str code)
(eval-str portal code)
(eval-str portal code opts)

Evaluate ClojureScript source given as a string in the UI runtime. The parameters:

  • portal: portal instance returned from portal.api/open or :all
  • code (string): the ClojureScript source
  • opts (map): evaluation options.
    • :verbose (boolean) optional, return a map containing more info that just the value.
      • Defaults to false.
    • :await (boolean) optional, await a promise result.
      • Defaults to false.
Evaluate ClojureScript source given as a string in the UI runtime. The parameters:

- portal: portal instance returned from `portal.api/open` or `:all`
- code (string): the ClojureScript source
- opts (map): evaluation options.
  - `:verbose` (boolean) optional, return a map containing more info that just the value.
    - Defaults to `false`.
  - `:await`   (boolean) optional, await a promise result.
    - Defaults to `false`.
sourceraw docstring

inspectclj/s

(inspect value)
(inspect value options)

Open a new portal window to inspect a particular value.

  • value: a value to inspect.
  • options: see portal.api/open for options.
Open a new portal window to inspect a particular value.

- value: a value to inspect.
- options: see `portal.api/open` for options.
sourceraw docstring

openclj/s

(open)
(open portal-or-options)
(open portal options)

Open a new inspector window. A previous instance can be passed as parameter to make sure it is open.

  • options (map): open options.
    • :theme (keyword) theme to use for Portal UI, see portal.colors/themes for themes.
      • Themes are applied per UI instance, not globally.
    • :window-title (string) browser window title.
      • Useful for distinguishing multiple UI instances.
    • :app (boolean) Run in --app mode via chrome.
Open a new inspector window. A previous instance can be passed as
parameter to make sure it is open.

- options (map): open options.
  - `:theme` (keyword) theme to use for Portal UI, see `portal.colors/themes` for themes.
    - Themes are applied per UI instance, not globally.
  - `:window-title` (string) browser window title.
    - Useful for distinguishing multiple UI instances.
  - `:app` (boolean) Run in `--app` mode via chrome.
    - Defaults to true when chrome is installed.
    - Will use PWA at https://djblue.github.io/portal/ when installed.
sourceraw docstring

register!clj/s

(register! var)

Register a var with portal. For now, the var should be a 1 arity fn.

Example:

(register! #'identity)

The function name and doc string will show up in the command palette.

Register a var with portal. For now, the var should be a 1 arity fn.

Example:

```clojure
(register! #'identity)
```

The function name and doc string will show up in the command palette.
sourceraw docstring

replclj/s

(repl)
(repl portal)

Start a repl for the given Portal session.

  • portal: Portal session returned via portal.api/open
Start a repl for the given Portal session.

- portal: Portal session returned via `portal.api/open`
sourceraw docstring

selectedclj/s

(selected)
(selected session)

Get a sequence of all currently selected values.

Get a sequence of all currently selected values.
sourceraw docstring

sessionsclj/s

(sessions)

Get all current portal sessions.

Get all current portal sessions.
sourceraw docstring

set-defaults!clj/s

(set-defaults! options)

Set default options for open and start. Parameters passed directly to either will override defaults.

Set default options for `open` and `start`.
Parameters passed directly to either will override defaults.
sourceraw docstring

startclj/s

(start options)

Start the HTTP server with non-default options. Only use if you need control over the HTTP server.

  • options (map): start options.
    • :host (string) optional, server host to use for Portal server.
      • Ignored if server already started.
    • :port (number) optional, server port to use for Portal server.
      • Ignored if server already started.
Start the HTTP server with non-default options. Only use if you need
control over the HTTP server.

- options (map): start options.
  - `:host` (string) optional, server host to use for Portal server.
    - Ignored if server already started.
  - `:port` (number) optional, server port to use for Portal server.
    - Ignored if server already started.
sourceraw docstring

stopclj/s

(stop)

Stop the HTTP server.

Stop the HTTP server.
sourceraw docstring

submitclj/s

(submit value)

Tap target function.

Usage:

(add-tap #'portal.api/submit)
(remove-tap #'portal.api/submit)
Tap target function.

Usage:

```clojure
(add-tap #'portal.api/submit)
(remove-tap #'portal.api/submit)
```
sourceraw docstring

tapclj/sdeprecated

(tap)

Add portal as a tap> target.

Add portal as a `tap>` target.
sourceraw docstring

urlclj/s

(url portal)

Get url for portal session.

  • portal: Portal session returned via portal.api/open
Get url for portal session.

- portal: Portal session returned via `portal.api/open`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close