Releases: gustafnk/h-include
Fix multiple alt attributes
Increase robustness of lazy loading extension
If IntersectionObserver is not found for h-include-lazy and h-import-lazy, load the fragment eagerly instead.
Security updates
No re-render on refresh and 304
- Do not re-render on refresh and 304
- Bug fix for user arguments for init function of h-include-lazy and h-import-lazy (
initLazyLoad
) - Security updates
Bug fix for h-import
Fixes a problem where h-import crashed when detecting elements with no rel="stylesheet" attribute.
v4.0.0
v3.1.1
v3.0.0
✅ Based on Custom Elements V1
✅ New extensions: h-include-lazy, h-import, h-import-lazy
✅ Tests now use mocha, easier to understand
✅ Better docs and examples
Also:
- The navigate attribute is broken out into the separate element , located in lib/h-include-extensions.js
- Changes to @src attribute don't automatically refresh an h-include element anymore
v2.0.1
Simple navigation within h-include
with navigate
attribute
- A very lightweight "iFrame without iFrame"
- For navigation that does not support refresh/bookmarks
- Doesn't support loading of inline css/script resources
- Use
target="_top"
for external links
Better configuration mechanism (JavaScript) – breaking change!
Better file structure for tests
Recursion check is now optional
Possible to inherit from h-include. Also, cross-browser CI.
It's now possible to inherit from an h-include
, which makes extending h-include
much easier.
(I did not bump a major version since the custom element syntax is still as before)
Also, @shogun70 has made a great job by configuring our tests to run at Saucelabs. Kudos 💯
More improvements:
Fragment extraction, various hooks, recursion check, improved docs
Include a document and extract a fragment
<h-include src="/other/document/here.html" fragment=".container"></h-include>
Hooks
- createContainer
- extractFragment
- replaceContent
- onEnd
Recursion check
Introduced a check that removes the 'infinite mirror effect' (i.e. including itself).