/open-with-a-tag

Open link by creating a tag and simulate click it

Primary LanguageHTML

Open Link With <a> tag

Install

npm i open-link-with-a-tag

Usage

import open from "open-with-a-tag";

open('https://www.google.com/', {
  rel: 'noreferrer noopener',
  target: '_blank'
})

Browser compatibility

  • Chrome 60+

Use Babel for better browser support