Namespace: Navigation:openTab

Navigation:openTab

Methods

openTab(urlopt, nullable, paramsopt, nullable, anchoropt, nullable, postParamsopt, nullable)

Opens a sub-window for the current window as _blank, which should result in a new tab in most browsers.

This method is just a shortcut for "redirect" with a set target and reasonable parameters.

By using "redirect", this method also automatically takes care of adding "noopener,noreferrer" to external links, which are determined by not having the same origin as the current location. For more manual control over such parameters, have a look at "openWindow" instead.

Parameters:
Name Type Attributes Default Description
url String <optional>
<nullable>

the location to load, if null current location is reloaded/used

params Object <optional>
<nullable>
null

plain object of GET-parameters to add to the url, adds to existing ones in the URL and overwrites existing ones with same name

anchor String <optional>
<nullable>
null

anchor/hash to set for called url, has precedence over URL hash

postParams Object <optional>
<nullable>
null

plain object of postParameters to send with the redirect, solved with a hidden form

Source:
See:
Example
openTab('/misc/faq.html');