HTMLBaseElement.h 880 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2020, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/HTML/HTMLElement.h>
  8. namespace Web::HTML {
  9. class HTMLBaseElement final : public HTMLElement {
  10. public:
  11. using WrapperType = Bindings::HTMLBaseElementWrapper;
  12. HTMLBaseElement(DOM::Document&, DOM::QualifiedName);
  13. virtual ~HTMLBaseElement() override;
  14. AK::URL const& frozen_base_url() const { return m_frozen_base_url; }
  15. virtual void inserted() override;
  16. virtual void parse_attribute(FlyString const& name, String const& value) override;
  17. private:
  18. // https://html.spec.whatwg.org/multipage/semantics.html#frozen-base-url
  19. // A base element that is the first base element with an href content attribute in a document tree has a frozen base URL.
  20. AK::URL m_frozen_base_url;
  21. void set_the_frozen_base_url();
  22. };
  23. }