MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / sendJavaScript

Method sendJavaScript

src/main/java/fielded/RemoteEditor.java:1271–1276  ·  view source on GitHub ↗

A general purpose Send some JavaScript to a text editor call. This is queued to run inside the animation cycle, and thus is thread-safe.

(String javascript)

Source from the content-addressed store, hash-verified

1269 * A general purpose Send some JavaScript to a text editor call. This is queued to run inside the animation cycle, and thus is thread-safe.
1270 */
1271 public void sendJavaScript(String javascript) {
1272 Log.log("javascript.trace", () -> ">>>Sending javascript");
1273 Log.log("javascript.trace", () -> javascript);
1274 Log.log("javascript.trace", () -> "<<<Sentjavascript");
1275 server.send(socketName, javascript);
1276 }
1277
1278 /**
1279 * A general purpose Send some JavaScript to a text editor call, doesn't queue it inside the animation cycle, this must be called from the main thread, or a blocking ThreadSync thread

Callers 5

runMethod · 0.95
lazyInitMethod · 0.95
executeTextFragmentMethod · 0.80
completionMethod · 0.80

Calls 2

logMethod · 0.95
sendMethod · 0.45

Tested by

no test coverage detected