Browser
val reload : ?background:bool -> ?prefix:bool -> ?browser:Bos.Cmd.t -> string -> (unit, Rresult.R.msg) Rresult.resultreload ~background ~prefix ~browser uri tries to reload or open the URI uri or an URI prefixed by uri if prefix is true (defaults to false) in browser browser (if unspecified a platform dependent procedure is invoked to determine the user preference).
If background is true (defaults to false), the browser application should be kept in the background, only the reload should occur. If false the browser application and reloaded window should be brought into focus.
The reload should always lead to the reload of a single browser tab found as follows.
Repeat from the frontmost browser window to the backmost one until a tab to reload is found:
- If the window's current tab's URI is
uri(or is prefixed byuriwhenprefixistrue), reload this tab. - If the window has one or more tab whose URI is
uri(or is prefixed byuriwhenprefixistrue), pick the left most one, make it current in the window and reload it.
- If the window's current tab's URI is
- If no tab was found, get the frontmost window. If the current tab has no URI, use that tab with
uriotherwise create a new tab withuriand make it current for the window.