DocumentFragment.cpp 631 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2020-2021, Luke Wilde <lukew@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/DOM/DocumentFragment.h>
  7. #include <LibWeb/DOM/Window.h>
  8. namespace Web::DOM {
  9. DocumentFragment::DocumentFragment(Document& document)
  10. : ParentNode(document, NodeType::DOCUMENT_FRAGMENT_NODE)
  11. {
  12. }
  13. DocumentFragment::~DocumentFragment()
  14. {
  15. }
  16. // https://dom.spec.whatwg.org/#dom-documentfragment-documentfragment
  17. NonnullRefPtr<DocumentFragment> DocumentFragment::create_with_global_object(Bindings::WindowObject& window)
  18. {
  19. return make_ref_counted<DocumentFragment>(window.impl().document());
  20. }
  21. }