Description
This is useful for sites which might want the cookie consent form to be rendered in a specific place on the page, e.g. above the rest of the page content e.g. https://www.gov.uk/
Proposed solution
The site can declare a placeholder <div id="cc-main"></div> on the page.
The library should then check if the #cc-main element exists on the page, and reuse it rather than creating a duplicate.
|
dom._ccMain = createNode(DIV_TAG); |
|
dom._ccMain.id = 'cc-main'; |
Additional details
No response
Description
This is useful for sites which might want the cookie consent form to be rendered in a specific place on the page, e.g. above the rest of the page content e.g. https://www.gov.uk/
Proposed solution
The site can declare a placeholder
<div id="cc-main"></div>on the page.The library should then check if the
#cc-mainelement exists on the page, and reuse it rather than creating a duplicate.cookieconsent/src/core/modals/index.js
Lines 13 to 14 in c3882de
Additional details
No response