Cannot read property 'contentWindow' of null

This isn’t API but I’m trying to embed my ecwid store into the bubble site, while the embed works, I got this error when I tried to check out with stripe via ecwid:

I googled around and this seems like an iframe problem to me. https://stackoverflow.com/questions/12199797/why-is-iframe-contentwindow-null

but i don’t know how to implement this?

$(function () {  
$("#myiframe").load(function () {                        
    frames["myframe"].document.body.innerHTML = htmlValue;
});
});

Someone please help! thanks!!!