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
- Change altSrcInclude to have element scope. Fixes #93 altSrcInclude previously had global scope, which explains the behaviour of only allowing a single alt attribute to be acted upon during multi... — committed to gustafnk/h-include by gustafnk 3 years ago
- Change altSrcInclude to have element scope. Fixes #93 altSrcInclude previously had global scope, which explains the behaviour of only allowing a single alt attribute to be acted upon during multi... — committed to gustafnk/h-include by gustafnk 3 years ago
- Change altSrcInclude to have element scope. Fixes #93 altSrcInclude previously had global scope, which explains the behaviour of only allowing a single alt attribute to be acted upon during multi... — committed to gustafnk/h-include by gustafnk 3 years ago
Thanks a lot! I’ll try to have a look at this next week.