Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore "promise-calling" to be a linkable defined term? #64

Closed
equalsJeffH opened this issue Oct 29, 2019 · 6 comments
Closed

restore "promise-calling" to be a linkable defined term? #64

equalsJeffH opened this issue Oct 29, 2019 · 6 comments

Comments

@equalsJeffH
Copy link

It'd be helpful if "promise-calling" would be made (restored as?) a <dfn> so other specs can auto-link to it, e.g., as https://www.w3.org/TR/credential-management-1/ does (the link now does not resolve correctly (it used to IIRC)). thx.

@marcoscaceres
Copy link
Contributor

@equalsJeffH, the promises guide merged into the WebIDL spec. Not sure if what you need is there (doesn't seem "promise calling" is there)... but likely what you want is already exported.

@annevk
Copy link
Member

annevk commented Oct 29, 2019

@equalsJeffH see links from #27. This is intentional and you'll need to refactor. Unfortunately we don't have tooling yet whereby we can find all downstream dependencies and notify them of a change.

@domenic
Copy link
Member

domenic commented Oct 29, 2019

Indeed. Promise calling is no longer needed; as long as you use Web IDL promise-returning callback types, you get that automatically by using the usual "invoke" hook.

Or in other words, per https://www.w3.org/2001/tag/doc/promises-guide#should-promise-call ,

In Web IDL-using specifications, this is automatically taken care of if you declare the developer function as a callback function and then invoke it.

Hope this helps. I'll close the issue since we won't be adding a separate promise-calling operation back, but feel free to ask here or elsewhere if you need help with using Web IDL callback functions.

@domenic domenic closed this as completed Oct 29, 2019
@equalsJeffH
Copy link
Author

equalsJeffH commented Nov 4, 2019

Thx @domenic -- I do have a question: what we are presently "promise-calling" in the credential-management (credman) spec is an algorithm returned by webauthn.

You can find this returned webauthn alg by searching the webauthn editors' draft spec for "Let constructCredentialAlg be". Where it is invoked from credman can be found by searching the credman editors' draft for "promise-calling".

Ought we formally declare that alg in webauthn as (this flavor of) a callback function? And then I'm wondering whether it will more or less work automagically if we invoke it from credman. Tho, the invoke alg assumes the callback function is written in script? Is what we're trying to do here similar to what "Issue 6" in WebIDL S 2.10. Callback functions is talking about where it says:

...use callback function types for platform object provided functions...

...?

@domenic
Copy link
Member

domenic commented Nov 5, 2019

Ah, hmm, that's a bit strange. Promise-calling only ever worked on JS functions.

Since I assume the algorithms in question are from specifications, not provided by authors, it seems like promise-calling is less necessary: you can just update the specifications to always return promises. That would be my advice.

@equalsJeffH
Copy link
Author

ok, thx, I'll give that a shot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants