update js method