HTMLLinkElement.h 574 B

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