-
Notifications
You must be signed in to change notification settings - Fork 25
Editorial: Add feature and protocol detection examples #371
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Marcos Cáceres <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive examples for feature detection and protocol checking to the Digital Credentials API documentation. It provides developers with practical guidance on how to detect API support and verify protocol availability before making API calls.
- Adds feature detection examples showing how to check if the Digital Credentials API is supported
- Introduces protocol checking examples using the
userAgentAllowsProtocol()
method for both single and multiple protocols - Updates existing credential request and issuance examples to include protocol validation and improved error handling
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
@timcappalli, mind having another look?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice examples 💪 I just had a couple of suggested changes, but nothing that should be considered blocking.
Co-authored-by: Matthew Miller <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
index.html:1
- There's a spelling error: 'Simliarly' should be 'Similarly'.
<!DOCTYPE html>
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Closes #366 #365
This pull request enhances the documentation in
index.html
by adding guidance on feature and protocol support detection for the Digital Credentials API. It also updates the example code for requesting and issuing digital credentials to check for protocol support before proceeding, improving robustness and user experience.Feature and protocol support detection:
DigitalCredential.userAgentAllowsProtocol()
static method to check if specific protocols are allowed, with examples for single and multiple protocols.Example code improvements:
userAgentAllowsProtocol()
before making API calls, and to provide fallback methods if the protocol is not supported. [1] [2]protocol
variable for clarity and consistency. [1] [2]JSON.stringify
.Preview | Diff