Exposing Data from the Outside World to the Plugin #2424
-
This isn't about how to write regular plugins. I'm looking for help with a clever hack. I'm working on an editor for writing Chrome extensions, allowing me to write code in VSCode and have the DOM of my plugin automatically re-drawn in real time. I already have all the necessary data in the main document object of the window where VSCode-Web is loaded. For simplicity, let’s say I have an object "document.runner" with a field "data" and a method "run". How can I run the "run" method and write a result into the "data"? How can I interact with this object from inside a VSCode plugin? I've compiled VSCode and am now trying to figure out how the IPC magic works to pass this variable around - but it's hard to grasp! So far, I understand that I can add a method in extHost.api.impl.ts. But what comes next? How do I establish a connection to my DOM? Are there existing patches to the VSCode codebase that implement something like this? Again, I know this isn't how plugins should be written. This is about hacking the development process to create a browser within a browser, specifically targeting the web version of VSCode. I don’t need this to work in Electron or headless browsers, because Chrome plugins doesn't work here. Do you know where I can find detailed documentation on the architecture of the IPC pipeline for plugin hosts and workers (apart from the code itself)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This forum is for extension authors. I do not really know the answer to your question. |
Beta Was this translation helpful? Give feedback.
This forum is for extension authors. I do not really know the answer to your question.
But we can keep this issue open in case someone from the community can help.