windows - Can't get native messaging to work in Chrome Extension -


Hope you can help me call me an executable jar with a chrome-extension

So I first edited it as my extension and said:

  "permissions": ["originalmotion"],  

I can see in the overview, that is allowed.

I'm working on Windows so I added a registry key: with HKEY_LOCAL_MACHINE \ SOFTWARE \ Google \ Chrome \ NativeMessagingHosts \ myextension: C: \ path \ to \ myextension.json

"myextension.json" includes:

  {"name": "myextension", "description": "my extension", "path": "myextension.bat", "Type": "stdio", "allowed_origins": ["chrome-extension: // [key] /"]  

myextension.bat includes:

<

My Excel In JS tension I try to call it this:

  var port = null; Var hostname = "mitigation"; [...] $ (this). Children (". ABC"). Click (function () {// warning ("test"); port = chrome.runtime.connectNative (hostname); warning (port); message = {"text": "nachchich"}; port post message (message );});  

But nothing happens, the first warning "test" will be executed. But nothing happens besides this.

I do not know how to debug it, because I have not received any response by executing it. Hope you can help me

/ Edit I just noticed that: "Uncheck type error: undefined is not a function (anonymous function)":

  port = chrome.extension.connectNative (hostname );  

or

  port = chrome.runtime.connectNative (hostName);  

/ Edit 2 is OK, now I got to do this work when I use a button in the browser with the following: chrome.browserAction.onClicked.addListener (Function () {chrome.extension .connectNative ('fbehost');});

But when I want to call it with a button in the website, it does not work:

  $ (this). Children (". ABC"). Click (function () {warning ("test"); port = chrome.extension.connect native ("fbhost");});  

The warning works, but nothing happens.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -