Better way to make Safari and Chrome refresh an <object>

Even with the current hack sometimes Safari and Chrome will not refresh the `<object>` until some event is triggered (e.g. a click on the page). This code tries to fix that.