MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / executeJavascript

Method executeJavascript

frontend/src/tools/sandbox.ts:80–87  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

78 }
79
80 public executeJavascript(code: string) {
81 const proxyFunc = Function("window", `"use strict";\n${code}`);
82 try {
83 proxyFunc?.bind(this.proxyWindow)(this.proxyWindow);
84 } catch (err) {
85 console.error("Plugin HTML card Error:\n", err);
86 }
87 }
88
89 public destroy() {
90 this.fakeWindow.$destroySandbox();

Callers

nothing calls this directly

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected