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

68publishers-cookie-consent

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

68publishers-cookie-consent - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2-beta.1

2

package.json
{
"name": "68publishers-cookie-consent",
"version": "0.3.1",
"version": "0.3.2-beta.1",
"description": "Cookie consent wrapper based on orestbida/cookieconsent with GTM integration.",

@@ -5,0 +5,0 @@ "homepage": "http://www.68publishers.io/",

@@ -21,2 +21,3 @@ <div align="center" style="text-align: center; margin-bottom: 50px">

* [Triggering tags based on the consent](#triggering-tags-based-on-the-consent)
* [Accessing the wrapper in the JavaScript](#accessing-the-wrapper-in-the-javascript)
* [Development](#development)

@@ -222,2 +223,23 @@ * [License](#license)

## Accessing the wrapper in the JavaScript
The wrapper is accessible in the `window` under the name `CookieConsentWrapper`. The recommended way how to manipulate with it is through event callbacks because the wrapper may not be fully initialized at the time your script is executed.
Callbacks are attached with calling of the method `CookieConsentWrapper.on()`.
### Init event
The only currently available event is `init`. A callback is invoked when the wrapper is fully initialized or directly if everything has been already initialized.
```html
<script>
CookieConsentWrapper.on('init', function (wrapper) {
if (wrapper.allowedCategory('analytics_storage')) {
// check if the analytics_storage is granted
}
wrapper.unwrap(); // get the original cookie consent plugin
});
</script>
```
## Development

@@ -224,0 +246,0 @@

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