You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just in brief a report on what I did to make it work with electron 1.8.4 - actually there may be better approaches since I'm not that deep into the matter. At least as a Proof-Of-Concept it works, configuration might be a big issue. But here we go (in brief!):
electron does not support chrome.extension.sendMessage and chrome.extension.onMessage which are both deprecated by the way. I had to use chrome.runtime instead of chrome.extension as MDN suggests.
is seems as if electron does not support background pages. Using Process Monitor on Windows 10 I could see that background.js is loaded but it seems to not get executed. So here comes the work-around in hope for better times.
I removed background.js from the manifest.json (although since it's not working this may not be necessary) and integrated it into script.js. Actually there is some fine tuning and I will give the details if someone needs it. More or less I encapsulated the background.js in a function which is called when the extension starts and replaced chrome.extension(runtime).sendMessage with a delayed (setTimeout(,0)) chrome.runtime.onMessage.emit. This is not really clean but seems to work as expected.
Two incompatibility corrections for the Chrome version (59) used in electron 1.8.4 (no InputEvent class) and a missing chrome.tabs (could be since my app is running in kiosk mode could be a electron issue but doesn't matter for me) and I got the keyboard running.
If there is any better way I would really like to hear about it!
Just in brief a report on what I did to make it work with electron 1.8.4 - actually there may be better approaches since I'm not that deep into the matter. At least as a Proof-Of-Concept it works, configuration might be a big issue. But here we go (in brief!):
If there is any better way I would really like to hear about it!
Jochen
PS: Forked the changes at https://github.com/JMS-1/chrome-virtual-keyboard. Sorry for the script.js mess due to the the reformatting (space/tabs): it's NOT that big of a change!
The text was updated successfully, but these errors were encountered: