Skip to content

Instantly share code, notes, and snippets.

@xyx0no646
Last active September 25, 2021 06:10
Show Gist options
  • Select an option

  • Save xyx0no646/9f84cce3cb5454eb5eae9750f1ade943 to your computer and use it in GitHub Desktop.

Select an option

Save xyx0no646/9f84cce3cb5454eb5eae9750f1ade943 to your computer and use it in GitHub Desktop.
class SomeObject{
function SomeObject(){
this.setTimeout = KirikiriEmscriptenInterface.evalJS('(func,time)=>setTimeout(func,time)');
this.setTimeout(this.timeout incontextof this,1000);
};
function timeout(){
Debug.message("timeout is called");
Debug.message(this); // Now It Works!
Debug.message("this value is:" + this);
}
}
var someObject = new SomeObject();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment