adaption to js.Global and js.This changes