Skip to content

Instantly share code, notes, and snippets.

@alejandrocoding
Last active June 24, 2020 12:27
Show Gist options
  • Save alejandrocoding/9fe4edde972ea0b9dfa8b7046cec6207 to your computer and use it in GitHub Desktop.
Save alejandrocoding/9fe4edde972ea0b9dfa8b7046cec6207 to your computer and use it in GitHub Desktop.
Sending a message from contentScript to access bookmark API
console.log('Starting contentScript');
chrome.runtime.sendMessage({ myBookMark: true }, (response) => {
console.log(response); // this is the response back from the listener in background.ts
});
console.log('Ending contentScript');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment