emits to script engine thread replaced by invokeMethod