You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

openURLInBrowser.web.ts 350B

123456789101112
  1. /**
  2. * Opens URL in the browser.
  3. *
  4. * @param {string} url - The URL to be opened.
  5. * @param {boolean} openInNewTab - If the link should be opened in a new tab.
  6. * @returns {void}
  7. */
  8. export function openURLInBrowser(url: string, openInNewTab?: boolean) {
  9. const target = openInNewTab ? '_blank' : '';
  10. window.open(url, target, 'noopener');
  11. }