mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 15:49:11 +00:00
LibWeb/Bindings: Generate undefined in a union as 'Empty'
This can only ever be undefined, and no other JS value, so it makes sense to use undefined to represent this case.
This commit is contained in:
parent
fef1f62ecc
commit
dfdcfc8e88
Notes:
github-actions[bot]
2025-01-12 18:40:27 +00:00
Author: https://github.com/shannonbooth
Commit: dfdcfc8e88
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3233
Reviewed-by: https://github.com/tcl3 ✅
5 changed files with 13 additions and 7 deletions
|
@ -25,7 +25,7 @@ public:
|
|||
virtual ~CustomElementRegistry() override;
|
||||
|
||||
JS::ThrowCompletionOr<void> define(String const& name, WebIDL::CallbackType* constructor, ElementDefinitionOptions options);
|
||||
Variant<GC::Root<WebIDL::CallbackType>, JS::Value> get(String const& name) const;
|
||||
Variant<GC::Root<WebIDL::CallbackType>, Empty> get(String const& name) const;
|
||||
Optional<String> get_name(GC::Root<WebIDL::CallbackType> const& constructor) const;
|
||||
WebIDL::ExceptionOr<GC::Ref<WebIDL::Promise>> when_defined(String const& name);
|
||||
void upgrade(GC::Ref<DOM::Node> root) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue