MCPcopy
hub / github.com/jabbany/CommentCoreLibrary / CCLScripting

Function CCLScripting

src/scripting/Host.js:1–24  ·  view source on GitHub ↗
(workerUrl)

Source from the content-addressed store, hash-verified

1var CCLScripting = function(workerUrl){
2 this.version = 1.0;
3 this.workerUrl = workerUrl;
4 this.logger = new function(){
5 this.log = function(m){
6 console.log(m);
7 };
8 this.error = function(m){
9 console.error(m);
10 };
11 this.warn = function(m){
12 console.warn(m);
13 };
14 };
15 this.getWorker = function(){
16 return new Worker(this.workerUrl);
17 };
18 this.getScriptingContext = function(stage){
19 return new this.ScriptingContext(this, stage);
20 };
21 this.getSandbox = function(stage, player){
22 return new this.BridgedSandbox(this, stage, player);
23 };
24};
25
26(function(){
27 if(!CCLScripting){

Callers

nothing calls this directly

Calls 3

logMethod · 0.80
errorMethod · 0.80
warnMethod · 0.80

Tested by

no test coverage detected