HTMLAnchorElement.h 418 B

1234567891011121314151617
  1. #pragma once
  2. #include <LibHTML/DOM/HTMLElement.h>
  3. class HTMLAnchorElement : public HTMLElement {
  4. public:
  5. HTMLAnchorElement(Document&, const String& tag_name);
  6. virtual ~HTMLAnchorElement() override;
  7. String href() const { return attribute("href"); }
  8. };
  9. template<>
  10. inline bool is<HTMLAnchorElement>(const Node& node)
  11. {
  12. return is<Element>(node) && to<Element>(node).tag_name().to_lowercase() == "a";
  13. }