1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

LibWeb: Port HTMLLinkElement to the ResourceClient interface

This commit is contained in:
Andreas Kling 2020-06-02 12:53:29 +02:00
parent b32761f2e0
commit 7197adbd55
2 changed files with 44 additions and 18 deletions

View file

@ -27,10 +27,13 @@
#pragma once
#include <LibWeb/DOM/HTMLElement.h>
#include <LibWeb/Loader/Resource.h>
namespace Web {
class HTMLLinkElement final : public HTMLElement {
class HTMLLinkElement final
: public HTMLElement
, public ResourceClient {
public:
HTMLLinkElement(Document&, const FlyString& tag_name);
virtual ~HTMLLinkElement() override;
@ -40,6 +43,13 @@ public:
String rel() const { return attribute("rel"); }
String type() const { return attribute("type"); }
String href() const { return attribute("href"); }
private:
// ^ResourceClient
virtual void resource_did_fail() override;
virtual void resource_did_load() override;
void load_stylesheet(const URL&);
};
template<>