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
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

@ -24,6 +24,14 @@ public:
virtual ~HostDefined() = default;
virtual void visit_host_defined_self(Cell::Visitor&) = 0;
template<typename T>
bool fast_is() const = delete;
virtual bool is_script() const { return false; }
virtual bool is_classic_script() const { return false; }
virtual bool is_module_script() const { return false; }
virtual bool is_javascript_module_script() const { return false; }
};
virtual ~Script() override;