"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7555/react/features/base/util/openURLInBrowser.web.ts" (28 Sep 2023, 350 Bytes) of package /linux/misc/jitsi-meet-7555.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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 
   11     window.open(url, target, 'noopener');
   12 }