Closed zngly-vlad closed 11 months ago
Duplicate of https://github.com/orestbida/cookieconsent/issues/487.
You can use the data-type
attribute to specify a custom type:
<script type="text/plain" data-type="text/partytown" data-cookiecategory="analytics">
console.log("executed");
</script>
My apologies - will test this out and close it if all is good.
Really awesome project, keep up the great work!
Description
PartyTown is a library which lets you handle loading scripts off the main thread in separate workers. This can help speed up your site.
Partytown depends on the
type="text/partytown"
attribute. CookieConsent relies ontype="text/plain"
to work.Proposed solution
The script needs to update from
type="text/plain"
totype="text/partytown"
. When this is done dynamicallywindow.dispatchEvent(new CustomEvent('ptupdate'));
needs to be run.Additional details
No response