Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make init async to ensure that all elements are present #12

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

caschberg
Copy link
Contributor

Without the async init Cookify would not enable elements loaded after the cookify script on page load.

After this change Cookify will call the init only after the page is loaded and all elements are present on the page. Also adds an optional callback to call once init is done with an example how to use it to show/hide the consent dialog.

@Jersyfi Jersyfi merged commit eca01b7 into Jersyfi:v3 Sep 26, 2022
@Jersyfi Jersyfi self-requested a review September 26, 2022 17:25
@Jersyfi Jersyfi added the enhancement New feature or request label Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants