javascript - Get binary data with XMLHttpRequest in a Firefox extension - Stack Overflow

I'm trying to download some binary data from my Firefox extension. When I try to set a created XML

I'm trying to download some binary data from my Firefox extension. When I try to set a created XMLHttpRequest to arraybuffer mode:

oHTTP = new XMLHttpRequest();   
oHTTP.responseType = "arraybuffer";

The error

InvalidStateErr
An attempt was made to use an object that is not, or is no longer, usable

is thrown.

Is there another way to download binary data in a Firefox extension?

I'm trying to download some binary data from my Firefox extension. When I try to set a created XMLHttpRequest to arraybuffer mode:

oHTTP = new XMLHttpRequest();   
oHTTP.responseType = "arraybuffer";

The error

InvalidStateErr
An attempt was made to use an object that is not, or is no longer, usable

is thrown.

Is there another way to download binary data in a Firefox extension?

Share Improve this question asked Nov 4, 2012 at 7:33 dmi_dmi_ 1,2572 gold badges13 silver badges26 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 9

You must call the open method first.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745509637a4630712.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信