z_exec_browser (zotonic_core v1.0.0-rc.17)
Open a site in Chrome or Chromium.
Summary
Functions
Runs Chrome opening it in the site URL. Ignore certificate errors and defines the site as secure, helpful to run Web Workers. For extra args @see https://peter.sh/experiments/chromium-command-line-switches/ Common args: --incognito Launches Chrome directly in Incognito private browsing mode --purge-memory-button Add purge memory button to Chrome --multi-profiles Enable multiple profiles in Chrome e.g.
Runs Chromium opening it in the site URL. Ignore certificate errors and defines the site as secure, helpful to run Web Workers. For extra args @see https://peter.sh/experiments/chromium-command-line-switches/ Common args: --incognito Launches Chromium directly in Incognito private browsing mode --purge-memory-button Add purge memory button to Chromium --multi-profiles Enable multiple profiles in Chromium e.g.
Opens the site URL as secure in a browser Currently supported: * Linux [Chrome, Chromium] * macOS [Chrome, Chromium]
Open a site on macOS in the default browser, on other platforms open in Chrome.
Functions
Runs Chrome opening it in the site URL. Ignore certificate errors and defines the site as secure, helpful to run Web Workers. For extra args @see https://peter.sh/experiments/chromium-command-line-switches/ Common args: --incognito Launches Chrome directly in Incognito private browsing mode --purge-memory-button Add purge memory button to Chrome --multi-profiles Enable multiple profiles in Chrome e.g.
z_exec_browser:chrome(foo, ["--incognito", "--start-maximized"]).
Runs Chromium opening it in the site URL. Ignore certificate errors and defines the site as secure, helpful to run Web Workers. For extra args @see https://peter.sh/experiments/chromium-command-line-switches/ Common args: --incognito Launches Chromium directly in Incognito private browsing mode --purge-memory-button Add purge memory button to Chromium --multi-profiles Enable multiple profiles in Chromium e.g.
z_exec_browser:chromium(foo, ["--incognito", "--start-maximized"]).
-spec exec_browser(Browser, SiteOrContext, ExtraArgs, Options) -> RetType when Browser :: atom(), SiteOrContext :: atom() | z:context(), ExtraArgs :: [string()], Options :: map(), RetType :: ok | {error, term()}.
Opens the site URL as secure in a browser Currently supported: * Linux [Chrome, Chromium] * macOS [Chrome, Chromium]
-spec open(SiteOrContext) -> RetType when SiteOrContext :: atom() | z:context(), RetType :: ok | {error, term()}.
Open a site on macOS in the default browser, on other platforms open in Chrome.