Skip to content

BinaryLoader 设置 xhr.responseType="arraybuffer",使用 xhr.response 响应数据 #3512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

linkkingjay
Copy link

XMLHttpRequest 支持响应数据 ArrayBuffer 类型,这里之前没有使用这个类型而是使用 responseText 然后再转换为 ArrayBuffer 是有什么历史原因吗?如果没有特殊原因,直接指定 responseType"arraybuffer" 然后使用 response 更好。

@pandamicro
Copy link
Contributor

Yes, it was due to history reason, when we created cocos2d-html5, there was no arraybuffer response type yet.

Thanks for the contribution, I will merge it in my PR
#3527

Because I changed the commit name to English, don't worry, your contribution is still noted in git.

@pandamicro pandamicro closed this Sep 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants