mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02: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:
committed by
Tim Ledbetter
parent
fef1f62ecc
commit
dfdcfc8e88
Notes:
github-actions[bot]
2025-01-12 18:40:27 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/dfdcfc8e884 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3233 Reviewed-by: https://github.com/tcl3 ✅
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user