Cant share javascript object instances between files.

n/a

Reproduciability

Reproduciability
Yes

General Client Info

Steps to reproduce the bug
N/A
Can you reproduce this bug (and how often)
N/A
Server you found the bug on
N/A

Message

There seems to be something preventing the sharing of object instances between different javascript files. using Cross-file_JavaScript_variables


example:


file0

Code
  1. API.sendChatMessage("foo type 1 ="+ typeof resource.file1.test())


file1

Code
  1. function Foo(){
  2. this.a = {}
  3. }
  4. function test(){
  5. foo = new Foo();
  6. API.sendChatMessage("foo type 0 = "+ typeof foo);
  7. return foo;
  8. }


returns

Code
  1. foo type 0 = object
  2. foo type 1 = function


The type gets converted to a function that is non invocable.