refine the design for javascript bridge call