2020-08-17 19:14:30 +01:00
|
|
|
/*
|
2021-09-06 01:07:11 +01:00
|
|
|
* Copyright (c) 2020-2021, Luke Wilde <lukew@serenityos.org>
|
2020-08-17 19:14:30 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-08-17 19:14:30 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <LibWeb/DOM/DocumentFragment.h>
|
2021-09-06 01:07:11 +01:00
|
|
|
#include <LibWeb/DOM/Window.h>
|
2020-08-17 19:14:30 +01:00
|
|
|
|
|
|
|
namespace Web::DOM {
|
|
|
|
|
|
|
|
DocumentFragment::DocumentFragment(Document& document)
|
|
|
|
: ParentNode(document, NodeType::DOCUMENT_FRAGMENT_NODE)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
DocumentFragment::~DocumentFragment()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-09-06 01:07:11 +01:00
|
|
|
// https://dom.spec.whatwg.org/#dom-documentfragment-documentfragment
|
|
|
|
NonnullRefPtr<DocumentFragment> DocumentFragment::create_with_global_object(Bindings::WindowObject& window)
|
|
|
|
{
|
2021-09-09 13:55:31 +02:00
|
|
|
return make_ref_counted<DocumentFragment>(window.impl().associated_document());
|
2021-09-06 01:07:11 +01:00
|
|
|
}
|
|
|
|
|
2020-08-17 19:14:30 +01:00
|
|
|
}
|