h-include: Loading more than one resource fails

When loading more than one external resource there is unexpected behaviour:

Current Behaviour

JS

require('h-include/lib/h-include');
require('h-include/lib/h-include-extensions');

window.addEventListener('load', function() {
    HInclude.initLazyLoad();
});

html:

<h-include-lazy src="/returns-500" alt="/nice-error">loading</h-include-lazy><br>
<h-include-lazy src="/returns-500" alt="/nice-error">loading</h-include-lazy><br>
<h-include-lazy src="/returns-500" alt="/nice-error">loading</h-include-lazy>

Page output:

nice error
loading
loading

Expected Behaviour

Page output:

nice error
nice error
nice error

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks a lot! I’ll try to have a look at this next week.