how to get/set cookies #391

Closed
opened 2026-01-29 16:38:25 +00:00 by claunia · 1 comment
Owner

Originally created by @theiviaxx on GitHub (Oct 3, 2019).

previously i added an event in the ipc.js file and built a custom nuget package for ElectronNET.Host, but i'd like to move away from that and just use the official releases.
However, i dont see anything on the Session object that would get a cookie

my code before was

electron_1.ipcMain.on('cookies', (event, args) => {
    electron_1.session.defaultSession.cookies.get({}, (error, cookies) => {
        event.sender.send('cookies', cookies);
    });
});
Originally created by @theiviaxx on GitHub (Oct 3, 2019). previously i added an event in the ipc.js file and built a custom nuget package for ElectronNET.Host, but i'd like to move away from that and just use the official releases. However, i dont see anything on the Session object that would get a cookie my code before was ```` electron_1.ipcMain.on('cookies', (event, args) => { electron_1.session.defaultSession.cookies.get({}, (error, cookies) => { event.sender.send('cookies', cookies); }); });
claunia added the question label 2026-01-29 16:38:25 +00:00
Author
Owner

@theiviaxx commented on GitHub (Oct 4, 2019):

I was able to do this via the HostHook stuff. I feel this is a pretty slick feature and i'd like to document it a bit, where would you like that to end up?

@theiviaxx commented on GitHub (Oct 4, 2019): I was able to do this via the HostHook stuff. I feel this is a pretty slick feature and i'd like to document it a bit, where would you like that to end up?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#391