Is it possible to call the Ctrl+D shortcut using JavaScript button click?
I want to add a "Add To Bookmark" button on my custom context menu for my website, for that I want a function that calls the "Ctrl+D" shortcut on a button click to show the browser's default "Add to Bookmark/ Favourites" dialog box.
I have tried many pre available solutions from internet but none of them is working for me.
let bookmark = document.querySelector('.bookmark');
bookmark.addEventListener('click', ()=> {
// Call The "Ctrl+D" Shortcut!
});
<button type="button" class="bookmark">Bookmark</button>