(close)
(close portal)
Close all current inspector windows.
portal.api/open
.Close all current inspector windows. - portal: Portal session returned via `portal.api/open`.
(docs)
(docs options)
Open portal docs.
portal.api/open
for options.Open portal docs. - options: see `portal.api/open` for options.
(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.api/open
or :all
:verbose
(boolean) optional, return a map containing more info that just the value.
false
.:await
(boolean) optional, await a promise result.
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`.
(inspect value)
(inspect value options)
Open a new portal window to inspect a particular value.
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.
(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.
:theme
(keyword) theme to use for Portal UI, see portal.colors/themes
for themes.
:window-title
(string) browser window title.
: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.
(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.
(repl portal)
Start a repl for the given Portal session.
portal.api/open
Start a repl for the given Portal session. - portal: Portal session returned via `portal.api/open`
(selected session)
Get a sequence of all currently selected values.
Get a sequence of all currently selected values.
(sessions)
Get all current portal sessions.
Get all current portal sessions.
(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.
(start options)
Start the HTTP server with non-default options. Only use if you need control over the HTTP server.
:host
(string) optional, server host to use for Portal server.
:port
(number) optional, server port to use for Portal server.
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.
(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) ```
(tap)
Add portal as a tap>
target.
Add portal as a `tap>` target.
(url portal)
Get url for portal session.
portal.api/open
Get url for portal session. - portal: Portal session returned via `portal.api/open`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close