mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibWeb: Add fast_is<T> for form, embed, image, and object elements
These are used by Window::supported_property_names(), which can get very hot.
This commit is contained in:
parent
70779e43ed
commit
75d5429d66
5 changed files with 31 additions and 0 deletions
|
@ -96,6 +96,8 @@ public:
|
|||
private:
|
||||
HTMLImageElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual bool is_html_image_element() const override { return true; }
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void finalize() override;
|
||||
|
||||
|
@ -137,3 +139,8 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLImageElement>() const { return is_html_image_element(); }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue