mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibJS+LibWeb: Add Object::fast_is<Element>()
This commit is contained in:
parent
88d8380920
commit
e07bb32455
|
|
@ -206,6 +206,7 @@ public:
|
|||
void define_native_accessor(Realm&, PropertyKey const&, ESCAPING Function<ThrowCompletionOr<Value>(VM&)> getter, ESCAPING Function<ThrowCompletionOr<Value>(VM&)> setter, PropertyAttributes attributes);
|
||||
|
||||
virtual bool is_dom_node() const { return false; }
|
||||
virtual bool is_dom_element() const { return false; }
|
||||
virtual bool is_dom_event() const { return false; }
|
||||
virtual bool is_html_window() const { return false; }
|
||||
virtual bool is_html_window_proxy() const { return false; }
|
||||
|
|
|
|||
|
|
@ -113,6 +113,8 @@ class WEB_API Element
|
|||
public:
|
||||
virtual ~Element() override;
|
||||
|
||||
virtual bool is_dom_element() const final { return true; }
|
||||
|
||||
FlyString const& qualified_name() const { return m_qualified_name.as_string(); }
|
||||
FlyString const& html_uppercased_qualified_name() const;
|
||||
|
||||
|
|
@ -710,3 +712,6 @@ enum class ValidationContext {
|
|||
WebIDL::ExceptionOr<QualifiedName> validate_and_extract(JS::Realm&, Optional<FlyString> namespace_, FlyString const& qualified_name, ValidationContext context);
|
||||
|
||||
}
|
||||
|
||||
template<>
|
||||
inline bool JS::Object::fast_is<Web::DOM::Element>() const { return is_dom_element(); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user