Communication Between WebView (React) and Plugin (JCEF)

Hello,

I am currently working on a plugin that includes a WebView to display some information. The WebView is running a React application, and I need to establish communication between the WebView and the plugin in both directions:

  1. WebView → Plugin: I need to send messages from the React-based WebView to the plugin.
  2. Plugin → WebView: The plugin should be able to send messages to the WebView as well.

I have managed to display the app in JCEF, but am struggling to pass messages. Could anyone provide guidance or examples on how to implement this communication flow?

Did Embedded Browser (JCEF) | IntelliJ Platform Plugin SDK not cover your use case?

Hey Yann,
the docs were helpful, but they didn’t fully cover what I needed. I found that CefMessageRouter worked for WebView → Plugin communication and was able to get that part working. Might be useful to include it in the docs as well.
Found this Stack Overflow post helpful: ipc - How to create persistent queries in JCEF - Stack Overflow

1 Like