- From: Emil Lundberg via GitHub <sysbot+gh@w3.org>
- Date: Wed, 15 Nov 2023 17:47:31 +0000
- To: public-webauthn@w3.org
Hm, it looks like this is the way it's supposed to be for `create` at least: https://w3c.github.io/webappsec-credential-management/#algorithm-create-cred >When creating a [Credential](https://w3c.github.io/webappsec-credential-management/#credential), it will return an algorithm that takes a [global object](https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-global) and returns an [interface object](https://webidl.spec.whatwg.org/#dfn-interface-object) inheriting from [Credential](https://w3c.github.io/webappsec-credential-management/#credential). This algorithm MUST be invoked from a [task](https://html.spec.whatwg.org/multipage/webappapis.html#concept-task). I can't find any similar language for `get`, though. And I'm a bit confused, because it seems like [§2.5.4. Create a Credential](https://w3c.github.io/webappsec-credential-management/#algorithm-create) can accept either a `Credential` (step 2 below) _or_ an algorithm that produces a `Credential` (steps 3-4): >1. Let r be the result of executing interfaces[0]'s [[[Create]](origin, options, sameOriginWithAncestors)](https://w3c.github.io/webappsec-credential-management/#dom-credential-create-slot) internal method on origin, options, and sameOriginWithAncestors. > > If that threw an [exception](https://webidl.spec.whatwg.org/#dfn-exception): [...] > >1. If r is a [Credential](https://w3c.github.io/webappsec-credential-management/#credential) or null, [resolve](https://webidl.spec.whatwg.org/#resolve) p with r, and terminate these substeps. > >1. Assert: r is an algorithm (as defined in [§ 2.2.1.4 [[Create]] internal method](https://w3c.github.io/webappsec-credential-management/#algorithm-create-cred)). > >1. [Queue a task](https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task) on global’s [DOM manipulation task source](https://html.spec.whatwg.org/multipage/webappapis.html#dom-manipulation-task-source) to run the following substeps: > > 1. [Resolve](https://webidl.spec.whatwg.org/#resolve) p with the result of [promise-calling](https://www.w3.org/2001/tag/doc/promises-guide#should-promise-call) r given global. But I guess that means we could leave `create()` as is? But we still need to fix the language for `get()`? -- GitHub Notification of comment by emlun Please view or discuss this issue at https://github.com/w3c/webauthn/issues/1984#issuecomment-1812989392 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 15 November 2023 17:47:32 UTC