Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 3 tasks
phal0r opened this issue Oct 6, 2024 · 0 comments · May be fixed by #7709
Open
1 of 3 tasks

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

phal0r opened this issue Oct 6, 2024 · 0 comments · May be fixed by #7709
Labels

Comments

@phal0r
Copy link

phal0r commented Oct 6, 2024

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

@phal0r phal0r added the triage label Oct 6, 2024
@phal0r phal0r linked a pull request Oct 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant