HTMLAnchorElement.h 672 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/HTML/HTMLElement.h>
  8. namespace Web::HTML {
  9. class HTMLAnchorElement final : public HTMLElement {
  10. public:
  11. using WrapperType = Bindings::HTMLAnchorElementWrapper;
  12. HTMLAnchorElement(DOM::Document&, QualifiedName);
  13. virtual ~HTMLAnchorElement() override;
  14. String href() const { return attribute(HTML::AttributeNames::href); }
  15. String target() const { return attribute(HTML::AttributeNames::target); }
  16. virtual bool is_focusable() const override { return has_attribute(HTML::AttributeNames::href); }
  17. };
  18. }