mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Amend Element interface to make it compatible with TrustedTypes
This commit is contained in:
parent
1368744d33
commit
db41ea8117
Notes:
github-actions[bot]
2025-10-27 16:16:02 +00:00
Author: https://github.com/tete17
Commit: db41ea8117
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6057
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/Lubrsi ✅
12 changed files with 93 additions and 61 deletions
|
|
@ -573,7 +573,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<DocumentOrXMLHttpRequest
|
|||
// 2. If body is a Document, then set this’s request body to body, serialized, converted, and UTF-8 encoded.
|
||||
if (body->has<GC::Root<DOM::Document>>()) {
|
||||
auto string_serialized_document = TRY(body->get<GC::Root<DOM::Document>>().cell()->serialize_fragment(HTML::RequireWellFormed::No));
|
||||
m_request_body = Fetch::Infrastructure::byte_sequence_as_body(realm, string_serialized_document.bytes());
|
||||
m_request_body = Fetch::Infrastructure::byte_sequence_as_body(realm, string_serialized_document.to_utf8().bytes());
|
||||
}
|
||||
// 3. Otherwise:
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue