LibJS+LibWeb: Add fast_is<T> helpers for HTML::Script class family

This commit is contained in:
Andreas Kling 2025-04-18 10:23:02 +02:00 committed by Andreas Kling
parent e7b6b84648
commit a9e415b3c4
Notes: github-actions[bot] 2025-04-18 12:47:51 +00:00
4 changed files with 27 additions and 0 deletions

View file

@ -42,6 +42,7 @@ protected:
virtual void visit_edges(Visitor&) override;
private:
virtual bool is_script() const final { return true; }
virtual void visit_host_defined_self(JS::Cell::Visitor&) override;
Optional<URL::URL> m_base_url;
@ -56,3 +57,6 @@ private:
};
}
template<>
inline bool JS::Script::HostDefined::fast_is<Web::HTML::Script>() const { return is_script(); }