I’m noticing that modules, when first added to a page, load in a container with data attribute [data-hs-cos-type=“custom_widget”] which then changes to [data-hs-cos-type=“module”] after page reload. i would expect it to always load in [data-hs-cos-type=“module”]. any ideas on why this is happening?
Hi, @ajatnb
Thanks for your question. I couldn’t find any matching post for this one. I’d like to invite some of our community members to the conversation — hey @evaldas @GiantFocal @BarryGrennan have you noticed this behaviour in any of your own work?
Best,
Jaycee
Hi @ajatnb
Please add the following script inside the tag to update the data-hs-cos-type attribute to module when the page loads.
window.addEventListener(‘load’, () => {
const element = document.querySelector(‘’);
if (element) {
element.setAttribute(‘data-hs-cos-type’, ‘module’);
}
});
Please replace the placeholder with the appropriate class or ID of the element.
Thanks!