0.0.4
Pre-release
Pre-release
https://www.npmjs.com/package/hydroactive/v/0.0.4
Changelog:
- 519e458 - Deletes
factory()
and templating implementation, movinghydrate()
out of/testing.js
export as a replacement. Instead of usingfactory()
to create a new instance of an element based on a template with a special attribute, prerender the component inside a template, clone that template, and thenhydrate()
it directly. See examples in 519e458. - 6244237 - Defines custom elements directly in
component('my-tag-name', () => { /* ... */ })
. A separatecustomElements.define()
call is no longer necessary. This makes it impossible to hydrate a HydroActive component without defining its custom element first, which removes a foot-gun that leaked dehydrated elements into user-space. - 144dd0f - Renames
$.hydrate()
to$.read()
. - c5b6d7c - Adds new implementation of
$.hydrate()
(originally named$.hydrateElement()
but subsequently renamed to$.hydrate()
in 6842fb7). This is like$.read()
and$.query()
, except that it requires the target to be dehydrated, and triggers hydration immediately with the given props. This allows fine-grained orchestration of hydration timing. - 6cbaa08 - Updates
$.query()
and$.queryAll()
to throw when they find a custom element. Use$.read()
or$.hydrate()
instead. - 6c85a54 - Removes type check restriction on
$.query()
and$.queryAll()
's selector. This was originally intended to catch accidental dehydrated queries of custom elements, but this is now asserted more thoroughly in 6cbaa08 and is obsoleted.