mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
integrate readablestream with fetch and blob
This commit is contained in:
parent
0281acea95
commit
bd5796c90b
74 changed files with 2219 additions and 899 deletions
|
@ -2,6 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::body::Extractable;
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::AttrBinding::AttrBinding::AttrMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
|
||||
|
@ -799,7 +800,15 @@ impl HTMLFormElement {
|
|||
},
|
||||
};
|
||||
|
||||
load_data.data = Some(bytes);
|
||||
let global = self.global();
|
||||
|
||||
let request_body = bytes
|
||||
.extract(&global)
|
||||
.expect("Couldn't extract body.")
|
||||
.into_net_request_body()
|
||||
.0;
|
||||
load_data.data = Some(request_body);
|
||||
|
||||
self.plan_to_navigate(load_data, target);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue