It's the duty and responsibility of a properly implemented browser to not allow a "website" to break basic UI functionality because it pushes some javascript. I don't care about how Safari and chrome and edge do it. Firefox should not follow their lead.
This is a fine example of why people install plugins like ublock origin and similar.