javascript - Chrome Extension - Sending variable from content script to event page -


i want event page variable content script sends message. far know, can send simple json message event page, such {greeting: "hello"}.

how can send variable content script event page?

i've looked json.stringify() send variable through json message haven't had luck.

say have variable named var, directly send via chrome.runtime.sendmessage without doing anything, because the message automatically json-serialized.

chrome.runtime.sendmessage({ data: var }); 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -