some js api for swift