mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
LibWeb: Make factory methods of DOM::Document fallible
This commit is contained in:
parent
552663a2ba
commit
0d9076c9f5
8 changed files with 17 additions and 24 deletions
|
@ -730,7 +730,7 @@ JS::NonnullGCPtr<Node> Node::clone_node(Document* document, bool clone_children)
|
|||
else if (is<Document>(this)) {
|
||||
// Document
|
||||
auto document_ = verify_cast<Document>(this);
|
||||
auto document_copy = Document::create(this->realm(), document_->url());
|
||||
auto document_copy = Document::create(this->realm(), document_->url()).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
// Set copy’s encoding, content type, URL, origin, type, and mode to those of node.
|
||||
document_copy->set_encoding(document_->encoding());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue