jiti-meet/react/features/base/util/openURLInBrowser.web.js

15 lines
360 B
JavaScript
Raw Normal View History

2019-10-11 18:09:50 +00:00
// @flow
/**
* Opens URL in the browser.
*
* @param {string} url - The URL to be opened.
* @param {boolean} openInNewTab - If the link should be opened in a new tab.
2019-10-11 18:09:50 +00:00
* @returns {void}
*/
export function openURLInBrowser(url: string, openInNewTab?: boolean) {
const target = openInNewTab ? '_blank' : '';
window.open(url, target, 'noopener');
2019-10-11 18:09:50 +00:00
}