If you paid for your Cert, perhaps you will get some support. Personally, I don't think it has anything to do with javascript. But the mention of being a
sub-domain also applies to my experience!
I don't use any javascript but I had a similar "instantaneous" event when I tested my site with a
free certificate, I lost absolutely every image! I "thanked" the
EIG owned hosting company for editing my .htaccess file
without my permission and got most of the images back.
After a week of completely useless "help", I reverted back to a plain html5 + PHP, "Not Secured" but nicely working site. It will be a cold day in.......
Well, let's just say it will, be a long time before I attempt any more changes with
that hosting company! I'm already planning on moving to a
non-EIG host as soon as my contract ends. I couldn't care less about my Google rankings.