JetBrains: Build a Java→JS bridge
Created by: vdavid
Context
We already have a JS→Java bridge.
On the Java side, we can run any JS with cefBrowser.executeJavaScript()
.
Example use case: notifying the web view when the theme changes.
Problem
Running any JS doesn’t sound like a good idea. If there is no planning around this, it'll likely become tough to understand what we're calling from Java and when.
Solution
Create a dedicated interface on the Java side. It would give us a single place for JS calls, plus some type safety. The result should probably be similar to the JS→Java bridge.