fix copy-paste error, all spxxx_to_jsval use lower case and add missing data structs getAttachment;