mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
LibWeb: Port HTMLLinkElement to the ResourceClient interface
This commit is contained in:
parent
b32761f2e0
commit
7197adbd55
2 changed files with 44 additions and 18 deletions
|
@ -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<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue