I don’t support old browsers in my (live, approved) extensions. My default approach is to put display: none; on the viewer html body, and wrap all of my client side javascript inside a
$(() => {
$("body").show();
// All client side code here
});
If the browser can’t handle the arrow function (looking at you IE) then nothing gets displayed or run. Probably not the best approach but easy and it works.