Skip to content

Commit 81b035c

Browse files
committed
Review feedback 1: CreateCookie, GetCookiesASync, and Expires
1 parent 09ec2cf commit 81b035c

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

specs/CookieManagement.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,9 @@ interface ICoreWebView2Cookie : IUnknown {
266266
/// The expiration date and time for the cookie as the number of seconds since the UNIX epoch.
267267
/// The default is -1.0, which means cookies are session cookies by default.
268268
[propget] HRESULT Expires([out, retval] double* expires);
269-
/// Set the Expires property. Cookies are session cookies
270-
/// and will not be persistent if Expires is negative.
269+
/// Set the Expires property. Cookies are session cookies and will not be
270+
/// persistent if Expires is set to -1.0. NaN, infinity, and any negative
271+
/// value set other than -1.0 is disallowed.
271272
[propput] HRESULT Expires([in] double expires);
272273
273274
/// Whether this cookie is http-only.
@@ -305,8 +306,9 @@ interface ICoreWebView2CookieManager : IUnknown {
305306
/// One can set other optional properties after cookie creation.
306307
/// This only creates a cookie object and it is not added to the cookie
307308
/// manager until you call AddOrUpdateCookie.
309+
/// name that starts with whitespace(s) is not allowed.
308310
/// See ICoreWebView2Cookie for more details.
309-
HRESULT CreateCookieWithDetails(
311+
HRESULT CreateCookie(
310312
[in] LPCWSTR name,
311313
[in] LPCWSTR value,
312314
[in] LPCWSTR domain,
@@ -422,7 +424,7 @@ namespace Microsoft.Web.WebView2.Core
422424
/// You can modify the cookie objects, call
423425
/// CoreWebView2CookieManager.AddOrUpdateCookie, and the changes
424426
/// will be applied to the webview.
425-
Windows.Foundation.IAsyncOperation<IVectorView> GetCookiesAsync(String uri);
427+
Windows.Foundation.IAsyncOperation<IVectorView<CoreWebView2Cookie>> GetCookiesAsync(String uri);
426428

427429
/// Adds or updates a cookie with the given cookie data; may overwrite
428430
/// cookies with matching name, domain, and path if they exist.
@@ -468,8 +470,9 @@ namespace Microsoft.Web.WebView2.Core
468470
/// this cookie will be sent to all pages on the Domain.
469471
String Path { get; };
470472

471-
/// The expiration date and time for the cookie as the number of seconds since the UNIX epoch.
472-
/// The default is -1.0, which means cookies are session cookies by default.
473+
/// The expiration date and time for the cookie.
474+
/// For .NET API, setting the Expires property to <see cref="System.DateTime.MinValue"/> makes this a session cookie, which is its default value.
475+
/// For WinRT API, setting the Expires property to <c>null</c> makes this a Cookie that is only good for the current HTTP session and will not be persisted.
473476
Windows.Foundation.DateTime Expires { get; set; };
474477

475478
/// Whether this cookie is http-only.

0 commit comments

Comments
 (0)