Skip to content

Releases: gustafnk/h-include

Fix multiple alt attributes

01 Nov 12:53
Compare
Choose a tag to compare
  • Fix bug where multiple alt attributes only fired once, #93
  • Major automated testing improvements (internal)

Increase robustness of lazy loading extension

06 Nov 10:56
Compare
Choose a tag to compare

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

24 Nov 17:06
Compare
Choose a tag to compare
  • 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

19 Oct 11:48
Compare
Choose a tag to compare

Fixes a problem where h-import crashed when detecting elements with no rel="stylesheet" attribute.

v4.0.0

14 Jul 09:27
Compare
Choose a tag to compare

Rename new alt attribute to when-false-src to support future feature for error handling.

v3.1.1

05 Jul 17:16
Compare
Choose a tag to compare

Support for @when attribute, with a reference to a predicate function. The @alt attribute is used when the predicate is falsy. See https://github.com/gustafnk/h-include#conditional-inclusion-using-when

v3.0.0

14 Jan 20:25
4a6bd19
Compare
Choose a tag to compare

✅ 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

28 May 06:48
Compare
Choose a tag to compare

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.

30 Jun 20:24
Compare
Choose a tag to compare

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:

  • h-include doesn't remove the whole @class attribute on success as before
  • Create an example of an h-include-lazy that skips initial loading (see readme)
  • Show how easy it is to create a lazy loaded h-include using hunt (see readme)
  • Change code style

Fragment extraction, various hooks, recursion check, improved docs

03 Jun 21:01
Compare
Choose a tag to compare

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).