Last active
November 24, 2017 20:54
-
-
Save zachhardesty7/f9b911c39eb6435989d4a0361cfd50bd to your computer and use it in GitHub Desktop.
content -> background
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function passToBackground() { | |
// {replace with code to collect data} | |
chrome.runtime.sendMessage({ | |
type: "fromContent", | |
data: "data" | |
}); | |
} | |
document.querySelector('.button').addEventListener('click', passToBackground); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment