Handling errors on HTML5 target

Hi,
was thinking how to handle errors for html5 version as some stuff could go wrong during loading (slow network, lose of network e.c) also some runtime errors could be thrown e.c.

So would like to inform player that something happened and would like to have some repeat button as well.

For now investigate 2 versions:

  1. show DOM element on top with buttons
  2. show popup inside openfl

for me version 2 is more appealing just not sure I can show something on top of Preloader (have custom preloader view defined that dissapears when everything is done);

Anyone have some expierence on such cases ? whats your prefered way to deal with them ?

Thank you