New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@livesession/electron-cookies

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@livesession/electron-cookies

Electron's environment doesn't come with built in support for a `document.cookie` API. By using this package, you can use the same `Document cookie` API within Electron.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
239
decreased by-0.83%
Maintainers
5
Weekly downloads
 
Created
Source

Electron Cookies

Electron's environment doesn't come with built in support for a document.cookie API. By using this package, you can use the same Document cookie API within Electron.

Installation

First, install the package:

npm install @livesession/electron-cookies

Usage

import ElectronCookies from '@livesession/electron-cookies';

// enable
ElectronCookies.enable({
  origin: 'https://example.com',
}); // or ElectronCookies.enable() for default

// disable
ElectronCookies.disable();

If your Electron app has the nodeIntegration preference set to false, you can include the dist via a <script> tag:

 <script src='./node_modules/@livesession/electron-cookies/dist/main.js'></script>

And inside JavaScript:

window.ElectronCookies.enable();

FAQs

Package last updated on 12 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc