dabolus / cookie-consent Goto Github PK
View Code? Open in Web Editor NEWA material design cookie consent.
License: MIT License
A material design cookie consent.
License: MIT License
Hi Dabolus,
are you planning a lit-element or at least Polymer 3 version of this element? If not, do you mind a PR?
Cheers!
As a DEVELOPER I want to have a property to enable/disable the IP location functionality.
Hi! Nice component!
I'm using the v1 if this component and I was trying to not check the user country, I just want to always show the cookie banner not matter where they are (At this moment there's no way to disable this in the component) so what I did was to set the geoIpUrl
to nothing (geo-ip-url=""
) and after this the console output this:
cookie-consent.html:274 Uncaught TypeError: Cannot use 'in' operator to search for 'country_code' in null
at HTMLElement._checkCountryCode (cookie-consent.html:274)
at HTMLElement.handler (polymer.html:507)
at HTMLElement.fire (polymer.html:1284)
at HTMLElement._handleResponse (iron-ajax.html:512)
at <anonymous>
I checked the component's code and there's a line where you check if there's a property with the name set in geoIpParam
inside the response
of the iron-request
.
https://github.com/Dabolus/cookie-consent/blob/master/cookie-consent.html#L280
Note: This is happenning on the v2 too.
The problem is that before this if
you check if response
is an object
:
https://github.com/Dabolus/cookie-consent/blob/2.0/cookie-consent.html#L277
And in my use case response
is null
and typeof null === 'object'
is true
.
I've created 2 PR to fix this in both versions (v1 and v2)
Thanks for your time and regards.
Hi Dabolus,
I am Binh, the author of the series Web Components Wednesday, where I will review some components every Wednesday.
The blog Cookie web components for displaying consent and managing cookie data featured your component, cookie-consent. I believe it is extremely useful during this GDPR era.
It would be great if you, the original author can have a word in the comment section.
Cheers,
Binh
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.