0

I used following node module, no luck

import Bookmark from 'react-bookmark';

<Bookmark className="coolClass" href="/cool/path" title="My Cool Website" />

And I added following code also, in react functional component.

function btnClick(){
    document.dispatchEvent(new KeyboardEvent('keydown', {'key': 'd', 'ctrlKey': true}));   
}

My requirement is, on button click it should bookmark in the browser bookmarks list. Thank you.

Kodali444
  • 1,283
  • 1
  • 17
  • 21

1 Answers1

0
https://stackoverflow.com/questions/3024745/cross-browser-bookmark-add-to-favorites-javascript

refer to this link this might help you.

Shilpe Saxena
  • 219
  • 2
  • 8