.. include:: ../Includes.txt .. _javascript-api: JavaScript API ============== :file:`cookieman.js` exposes these methods: cookieman.showOnce() ^^^^^^^^^^^^^^^^^^^^ .. rst-class:: dl-parameters cookieman.showOnce() :sep:`|` :aspect:`Data type:` void :sep:`|` Shows the confirmation modal when consent has not been saved yet. It is automatically called on each page from :file:`cookieman-init.js` (with an aditional condition, see :ref:`when-is-it-shown`) cookieman.show() ^^^^^^^^^^^^^^^^ .. rst-class:: dl-parameters cookieman.show() :sep:`|` :aspect:`Data type:` void :sep:`|` Shows the confirmation modal. You can call that from anywhere you need it (e.g. with a link from your data protection declaration page). .. code-block:: HTML .. attention:: If your website uses a strict `Content-Security-Policy` (see `Mozilla Developer Network `__) the onclick= needs to be replaced with registering a click-handler from an external