cookieconsent
cookieconsent copied to clipboard
[Feat]: Reuse the "#cc-main" element where possible
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.
https://github.com/orestbida/cookieconsent/blob/c3882de2822a26eb9842c8b019d228374cf9b075/src/core/modals/index.js#L13-L14
Additional details
No response