We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi
I am developing multiple extensions at the same time, but the console output will affect each other, all extensions will be received.
my solution is to add extensionId judgment, only output in the current extension.
JSXEvent:
function JSXEvent(payload, eventType) { try { var xLib = new ExternalObject("lib:PlugPlugExternalObject"); } catch (e) { // JSXEvent(e, "console"); } if (xLib) { var extensionId=arguments.callee.extensionId; var eventObj = new CSXSEvent(); eventObj.type = eventType; eventObj.data = payload; eventObj.scope = "APPLICATION"; if(!!extensionId)eventObj.extensionId = extensionId; eventObj.dispatch(); } return; }
Panel.vue
this.csInterface.addEventListener("console", (msg) => { if (msg.data && msg.data !== "undefined" && msg.extensionId===this.csInterface.getExtensionID()) console.log(msg.data); }); this.csInterface.addEventListener("console_error", (msg) => { if (msg.data && msg.data !== "undefined" && msg.extensionId===this.csInterface.getExtensionID()) console.error(msg.data); }); this.csInterface.addEventListener("console_debug", (msg) => { if (msg.data && msg.data !== "undefined" && msg.extensionId===this.csInterface.getExtensionID()) console.debug(msg.data); }); this.csInterface.addEventListener("console_clear", () => { if (msg.extensionId===this.csInterface.getExtensionID()) console.clear(); });
Initialize extensionIId before console:
evalScript(`JSXEvent.extensionId=${new CSInterface().getExtensionID()};`)
Thank you again for your project and make my work more efficient;
The text was updated successfully, but these errors were encountered:
I'll merge and update this soon. Thanks!
Sorry, something went wrong.
Inventsable
No branches or pull requests
Hi
I am developing multiple extensions at the same time, but the console output will affect each other, all extensions will be received.
my solution is to add extensionId judgment, only output in the current extension.
JSXEvent:
Panel.vue
Initialize extensionIId before console:
Thank you again for your project and make my work more efficient;
The text was updated successfully, but these errors were encountered: