Welcome Guest, Not a member yet? Register   Sign In
need to communicate with Extension
#1

I have a Chrome Extension that is installed in the same browser that is hosting my CI based app. I need to communicate from the web app to the Extension. I was told that I could do this by running this in the web app:


Code:
chrome.runtime.sendMessage(editorExtensionId, {openUrlInEditor: url},
 function(response) {
   if (!response.success)
     handleError(url);
 });
This will generate a message that my Extension can see and react to.

The question is "how do I run the above code from my CI based php app"? Is that javascript that I can run when my app starts up? Since the server is generating HTML pages, how do I get this working? I do need to see the result of this call since I will "grey out" certain functions in my web app if the Extension is not found. 

Any clues? 
proof that an old dog can learn new tricks
Reply


Messages In This Thread
need to communicate with Extension - by richb201 - 04-12-2019, 06:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB