XMLDocument.cpp 661 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2023, Luke Wilde <lukew@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Bindings/XMLDocumentPrototype.h>
  7. #include <LibWeb/DOM/XMLDocument.h>
  8. namespace Web::DOM {
  9. JS::NonnullGCPtr<XMLDocument> XMLDocument::create(JS::Realm& realm, AK::URL const& url)
  10. {
  11. return realm.heap().allocate<XMLDocument>(realm, realm, url);
  12. }
  13. XMLDocument::XMLDocument(JS::Realm& realm, AK::URL const& url)
  14. : Document(realm, url)
  15. {
  16. }
  17. void XMLDocument::initialize(JS::Realm& realm)
  18. {
  19. Base::initialize(realm);
  20. set_prototype(&Bindings::ensure_web_prototype<Bindings::XMLDocumentPrototype>(realm, "XMLDocument"));
  21. }
  22. }