add javascript thread