fixed #3185 support for html5.