Skip to content

openUrl

Open URL in new window/tab.

Usage

js
import { openUrl } from 'js-cool'

Signature

typescript
function openUrl(url: string): void

Parameters

ParameterTypeDescription
urlstringURL to open

Examples

js
openUrl('https://example.com')
// Opens in new tab

// Open download link
openUrl('/files/document.pdf')

Released under the MIT License.