mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
LibWeb: Default implementation of some Credential
methods
Provide the default implementation for `is_conditional_mediation_available` and `will_request_conditional_creation`.
This commit is contained in:
parent
21f4fdf804
commit
cb2bcb30e4
1 changed files with 4 additions and 4 deletions
|
@ -12,15 +12,15 @@ namespace Web::CredentialManagement {
|
|||
// https://www.w3.org/TR/credential-management-1/#dom-credential-isconditionalmediationavailable
|
||||
GC::Ref<WebIDL::Promise> Credential::is_conditional_mediation_available(JS::VM& vm)
|
||||
{
|
||||
auto* realm = vm.current_realm();
|
||||
return WebIDL::create_rejected_promise_from_exception(*realm, vm.throw_completion<JS::InternalError>(JS::ErrorType::NotImplemented, "is conditional mediation available"sv));
|
||||
// 1. Return a promise resolved with false.
|
||||
return WebIDL::create_resolved_promise(*vm.current_realm(), JS::Value(false));
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/credential-management-1/#dom-credential-willrequestconditionalcreation
|
||||
GC::Ref<WebIDL::Promise> Credential::will_request_conditional_creation(JS::VM& vm)
|
||||
{
|
||||
auto* realm = vm.current_realm();
|
||||
return WebIDL::create_rejected_promise_from_exception(*realm, vm.throw_completion<JS::InternalError>(JS::ErrorType::NotImplemented, "will request conditional creation"sv));
|
||||
// 1. Return a promise resolved with undefined.
|
||||
return WebIDL::create_resolved_promise(*vm.current_realm(), JS::js_undefined());
|
||||
}
|
||||
|
||||
Credential::~Credential() { }
|
||||
|
|
Loading…
Add table
Reference in a new issue