Get binary data using XMLHttpRequest in Firefox extension

I am trying to download some binary data from my Firefox extension. When I try to set the generated XMLHttpRequest to arraybuffer mode:

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

Error

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

.

Is there any other way to load binary data into a Firefox extension?

+4
source share
1 answer

You must first call the open method.

+9
source

Source: https://habr.com/ru/post/1443916/


All Articles