How to pass formData to postData in loadOneTab?

前端 未结 1 584
Happy的楠姐
Happy的楠姐 2021-01-28 20:03

I have a formData object and would like to pass it to loadOneTab()

Example:

var formData = Components.classes[\'@mozilla.org/fi         


        
1条回答
  •  醉梦人生
    2021-01-28 20:30

    I already kinda answered this as part of your last question.

    Unfortunately we cannot use FormData here, as there is currently no way to get the stream (and other information) from a FormData instance (nsIXHRSendable is not scriptable, unfortunately). postData however expects the value to be an nsIInputStream instance.

    So there is no way to use FormData in conjunction with loadOneTab and friends (essentially all and methods expect a stream if they accept a postData argument).

    0 讨论(0)
提交回复
热议问题