Is there some way of registering global / util functions or allowing certain functions to be accessed via static calls? Creating a class with static functions so I can call Class.function() doesnt work here.
An alternative I tried was something like the following
const FakeClass = {
doSomething(param) {
// some stuff here
}
}
global.FakeClass = FakeClass
or something like
function FakeClass() { }
// example 1
FakeClass.doSomething = function(param) {
// some stuff here
}
// example 2
FakeClass.prototype.doSomething = function(param) {
// some stuff here
}
global.FakeClass = FakeClass
and then calling FakeClass.doSomething(). But both of these give me a java.lang.UnsupportedOperationException
Is there some way I can get a Class.function() style of calling functions across scripts?
