From 2c06bf7252757a765a9127c67205f0b6ef1c199b Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 3 Aug 2018 20:00:10 -0500 Subject: [PATCH 1/3] Added signal to CredentialRequestOptions and CredentialCreationOptions interfaces. --- types/webappsec-credential-management/index.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/types/webappsec-credential-management/index.d.ts b/types/webappsec-credential-management/index.d.ts index 9ab3292c3b..12b2468c3e 100644 --- a/types/webappsec-credential-management/index.d.ts +++ b/types/webappsec-credential-management/index.d.ts @@ -314,6 +314,11 @@ interface CredentialRequestOptions { * This property specifies options for requesting a public-key signature. */ publicKey?: PublicKeyCredentialRequestOptions; + + /** + * This property lets the developer abort an ongoing get() operation. + */ + signal?: AbortSignal; } /** @@ -342,6 +347,10 @@ interface CredentialCreationOptions { * @see {@link https://w3c.github.io/webauthn/#dictionary-makecredentialoptions} */ publicKey?: PublicKeyCredentialCreationOptions; + /** + * @see {@link https://w3c.github.io/webappsec-credential-management/#dom-credentialrequestoptions-signal} + */ + signal?: AbortSignal; } /** From 84ccd818d7414b089b34a2ef6561e8710d93d66a Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 3 Aug 2018 20:57:39 -0500 Subject: [PATCH 2/3] Updated TypeScript version in modified index file.. --- types/webappsec-credential-management/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/webappsec-credential-management/index.d.ts b/types/webappsec-credential-management/index.d.ts index 12b2468c3e..ad36b0318d 100644 --- a/types/webappsec-credential-management/index.d.ts +++ b/types/webappsec-credential-management/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/w3c/webappsec-credential-management // Definitions by: Iain McGinniss // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.7 // Spec: https://www.w3.org/TR/2017/WD-credential-management-1-20170804 From 3721705444a3924f32a6b3c714ef1b94d7db548d Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 3 Aug 2018 21:15:35 -0500 Subject: [PATCH 3/3] Fixed error in seemingly unrelated test case. --- .../webappsec-credential-management-tests.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/types/webappsec-credential-management/webappsec-credential-management-tests.ts b/types/webappsec-credential-management/webappsec-credential-management-tests.ts index 2afa9f8785..a475fa5379 100644 --- a/types/webappsec-credential-management/webappsec-credential-management-tests.ts +++ b/types/webappsec-credential-management/webappsec-credential-management-tests.ts @@ -214,7 +214,10 @@ function signOutDeprecated() { } navigator.credentials.requireUserMediation().then(() => { - document.location.assign('/'); + const location = document.location; + if (location) { + location.assign('/'); + } }); } @@ -224,7 +227,10 @@ function signOut() { } navigator.credentials.preventSilentAccess().then(() => { - document.location.assign('/'); + const location = document.location; + if (location) { + location.assign('/'); + } }); }