let hello = (name) => hyper()`<h1>Hello ${name}!</h1>`;
hyper(document.body)`${hello('World')}`;
// and you can use hyperHTML super powers
// without even needing hyperHTML to render
// portability FTW ๐
document.body.appendChild(hello('Everyone'));
https://t.co/PRP2fIoQno
FYI these updates have been alredy reflected in both heresy/ssr and HyperHTMLElement ๐ฆ
there is still no support in viperHTML, but it's coming soon
https://t.co/WtuznC3xmT
basicHTML v1 is out ๐
the major change is due 2 new kind of nodes that acts like native: `canvas`, and `img`
see the example in the updated README and happy coding!
https://t.co/s8ELY9h9Qb
latest lighterhtml 0.14.5 also fixed an issue with holed wired content, so that both `html.for(...)` and `svg.for(...)` will now work as reliably as in hyperHTML ๐
lighterhtml 0.14 brought in a new feature already used in ๐ฅheresy: you can avoid meomized/optimized values and intercept/trigger directly setters each render time through the `<el .prop=${'each render'} />` non standard syntax, 100% inspired by lit-html.
https://t.co/83zZjODJws
hyperHTML and lighterhtml updates:
โข fixed type=text/css kind of unquoted attributes gotcha
โข workaround infamous IE/Edge `null` attributes behavior
As side note, domsanitizer and domconstants have been refactored out of domtagger for easy re-use in third part projects
testing custom elements??, check out some exampes here using https://t.co/TpJadDlLdp and tressa https://t.co/p0BWD9Fg1J #javascript#testing@Cypress_io@viperHTML
Finally pushed to "prod" the latest version of my very own, dumb, website. ๐
Now using #hyperHTML (@viperHTML) and @parceljs (+ husky and gh-pages for build/deploy)... it's really a joy to make things with such great libs and tools. ๐ฅฐ
https://t.co/vEprfhzYE0
hyperHTML 2.15 introduces slotted invokations to simplify/scope intents, instead of using the shared registry.
A reference to the unique node representing directly or indirectly that portion of the page is always passed, making wires super easy.
Code Pen: https://t.co/4IqgUftOmc
@1076 attributes in hyperHTML do node exist, events are already defined as addEventListener so there's absolutely nothing different from onclick=${handler} you should do, if you want exactly to use addEventListener instead + the right channel for technical questions is never twitter ๐
hyperHTML 2.14 is out ๐
โข up to 3X faster diffing via domdiff V2
โข improved diffing reliability over some random failing edge case
โข a bit fatter than usual (+0.6K) but with all petit-dom like optimizations ๐ป
https://t.co/3a28iQ7IYg
hyperHTML patch 2.13.1 "TyperScript shenanigans" is out, patching yet another time broken transpiled code produced by TS in production.
Highly suggested to switch for performance boost and to avoid useless GC operations only TypeScript was doing out there.
https://t.co/Sa3V5DevNU
HyperHTMLElement v3 is out:
Breaking
โข this.render() implicitly invoked when created() is not defined
โข created() executes only once even if explicitly (or accidentally) invoked N times
New(wish)
โข booleanAttributes let you easily observe booleans
https://t.co/wvRLsJqXjk
Introducing hyperHTML.define("hyper:attribute", callback)
A pull request to attach generic behaviors to any custom attribute, receiving the target node and the generic interpolated value.
PR ready to land in 2.13
https://t.co/nbXo0jgGGF
if anyone is wondering why it's not called createdCallback, that's simply because that is a Custom Elements V0 methods and I didn't want to clash anyhow with that method in HyperHTMLElement, specially for browsers with V0, but no V1, so that there are zero interferences. ๐
HyperHTMLElement 2 is out, and it solves once, and forever, any race condition around `created()` callback.
It will inevitably run, before any other method, since that is the most reasonable and expected behavior per each component.
https://t.co/wvRLsJqXjk