diff --git a/Changelog.md b/Changelog.md
index 18871751..9cb75861 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,10 @@
+# 0.4.1
+
+## ElectronNET.Core
+
+- Fixed handling of `Center` property for windows (#1001)
+- Added missing methods on `Cookies` (#1000)
+
# 0.4.0
## ElectronNET.Core
diff --git a/docs/GettingStarted/Console-App.md b/docs/GettingStarted/Console-App.md
index ec8a6043..cd091efe 100644
--- a/docs/GettingStarted/Console-App.md
+++ b/docs/GettingStarted/Console-App.md
@@ -54,7 +54,7 @@ Add the Electron.NET configuration to your `.csproj` file:
-
+
```
diff --git a/src/ElectronNET.API/API/Cookies.cs b/src/ElectronNET.API/API/Cookies.cs
index dac0d2d0..17ac7eee 100644
--- a/src/ElectronNET.API/API/Cookies.cs
+++ b/src/ElectronNET.API/API/Cookies.cs
@@ -2,6 +2,7 @@
using ElectronNET.API.Serialization;
using System;
using System.Text.Json;
+using System.Threading.Tasks;
namespace ElectronNET.API
{
@@ -54,10 +55,79 @@ public event Action OnChanged
_changed -= value;
if (_changed == null)
+ {
BridgeConnector.Socket.Off("webContents-session-cookies-changed" + Id);
+ }
}
}
private event Action _changed;
+
+
+
+ ///
+ /// Sends a request to get all cookies matching filter, and resolves a callack with the response.
+ ///
+ ///
+ ///
+ /// A task which resolves an array of cookie objects.
+ public Task GetAsync(CookieFilter filter)
+ {
+ var tcs = new TaskCompletionSource();
+ var guid = Guid.NewGuid().ToString();
+
+ BridgeConnector.Socket.Once("webContents-session-cookies-get-completed" + guid, tcs.SetResult);
+ BridgeConnector.Socket.Emit("webContents-session-cookies-get", Id, filter, guid);
+
+ return tcs.Task;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task SetAsync(CookieDetails details)
+ {
+ var tcs = new TaskCompletionSource