mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-19 16:59:47 +00:00
LibJS+LibWeb: Add JS::Object::fast_is<T> helpers for some LibWeb types
These are slightly unfortunate as we're crossing the library boundary, but there's precedent with Object::is_dom_node(), and these are just knocking down a few more items that were showing up in profiles.
This commit is contained in:
parent
207afb0d3b
commit
d8188c9f14
Notes:
github-actions[bot]
2025-04-18 12:47:12 +00:00
Author: https://github.com/awesomekling
Commit: d8188c9f14
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4395
5 changed files with 24 additions and 0 deletions
|
@ -190,6 +190,11 @@ 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_event() const { return false; }
|
||||
virtual bool is_html_window() const { return false; }
|
||||
virtual bool is_html_window_proxy() const { return false; }
|
||||
virtual bool is_html_location() const { return false; }
|
||||
|
||||
virtual bool is_function() const { return false; }
|
||||
virtual bool is_promise() const { return false; }
|
||||
virtual bool is_error() const { return false; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue