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

Plugin API to communicate with other plugins #374

Open
HideBa opened this issue Nov 22, 2022 · 0 comments
Open

Plugin API to communicate with other plugins #374

HideBa opened this issue Nov 22, 2022 · 0 comments
Labels

Comments

@HideBa
Copy link
Member

HideBa commented Nov 22, 2022

Leader

User story

Users sometimes want to link data between plug-ins. For example, when a button in one plugin is pressed, it triggers an event in another plugin.

Requirements

type PluginExtensionInstance = {
  id: string; // widget id, block id
  pluginId: string; // includes version
  name: string; // excludes version
  extensionId: string;
  extensionType: "widget" | "block";
};

reearth.plugins.instances: PluginExtensionInstance[]
reearth.plugins.postMessage(id: string; message: any)
reearth.on("pluginmessage", (e: { data: any, sender: string }) => {})

Examples

Testing list

  • [ ]
@HideBa HideBa added the PBL label Nov 22, 2022
pyshx pushed a commit that referenced this issue Apr 17, 2023
* feat: add API viewport query

* refactor: types

* refactor: remove value check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant