fix copy-paste error, all spxxx_to_jsval use lower case and add missing data structs getAttachment;
Merge pull request #5362 from ucchen/develop

closed #4037: fix copy-paste error, all spxxx_to_jsval use lower case;