HTML5, CSS3 & JS Experiments

By Martin Ivanov

EU Cookie Consent Tag

Solution to the EU Cookie Law, wrapped as a custom HTML5 Web Component. If you don't see the Cookie Consent bar, open your browser's development tools, delete the _acidjs_xcookie_consent_dismissed cookie and reload the page or click here.

<acidjs-xcookie-consent>
    This website uses cookies to ensure you get the best experience.
</acidjs-xcookie-consent>
<acidjs-xcookie-consent position="top" dismiss-button-text="Understood">
    This website uses cookies to ensure you get the best experience.
</acidjs-xcookie-consent>
<acidjs-xcookie-consent dir="rtl"></acidjs-xcookie-consent>

Demo

Take a look at the bottom of the page. If you don't see the Cookie Consent bar, open your browser's development tools, delete the _acidjs_xcookie_consent_dismissed cookie and reload the page or click here.

Register Mozilla's X-Tags

You need to do this just once, and add the directive either in the <head /> section or before the closing <body /> tag of the page.

<script src="AcidJs.AcidJs.XCookieConsent/lib/x-tag-components.js"></script>

Register the Component on the Page via HTML5 @import

You need to do this just once, and add the directive either in the <head /> section or before the closing <body /> tag of the page.

<link rel="import" href="AcidJs.XCookieConsent/classes/XCookieConsent.html" />

HTML Attributes

Check the blogpost or the documentation in the distrubution file (the download link is at the top of the page).

JavaScript API: Methods, Getters and Setters

Check the blogpost or the documentation in the distrubution file (the download link is at the top of the page).

Usage and Code Insight

            <p>Take a look at the bottom of the page. If you don't see the Cookie Consent bar, open your browser's 
                development tools, delete the <code>_acidjs_xcookie_consent_dismissed</code> 
                cookie and reload the page or <a href="#" name="show-cookie-consent-bar">click here</a>.</p>
            <!-- <acidjs-xcookie-consent hidden>
                This website uses cookies to ensure you get the best browsing experience.
            </acidjs-xcookie-consent> -->
        

Please, disable your ad blocker

This website is made possible by displaying online advertisements to the visitors. To view the content, please, disable your ad blocker, then refresh the page.