Skip to content

[Feature]: Better decouple PluginCall from MessageHandler class #7700

@phal0r

Description

@phal0r

Description

Replace the first Parameter of the Constructor of PluginCall with an interface

Platforms

  • iOS
  • Android
  • Web

Request or proposed solution

I am building a solution, that uses an alternative JS runtime to run Capacitor Plugins not only from within the webview. This allows to execute JS in the background and still use existing plugins for native functionality.

The PoC is working, but I was facing issues as I need to extend MessageHandler class in order to properly create PluginCalls. As MessageHandler expects a webView instance, I have no way to make it work cleanly.

It would be easy to replace MessageHandler with an Interface, that specifies postMessage and sendReponseMessage signatures for PluginCall to make everything more flexible.

Alternatives

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions