- improved MutationObserver and fallback so that double
dis/connected
events won't happen again - exposed
observe
utility for 3rd parts so that it is possible to observe any node, not only those defined via template literals. Once observed, a node can haveconnected
anddisconnected
listeners that will be triggered automatically.
- modified
Wire
class to better handle "same target" case, making thehaunted.html
demo work same way as if it was bound to the node, throughvalueOf()
invoke which would result in just exactly the same node if the wired content produced a node instead of a fragment. While regular users won't be affected, this is an implementation detail that changes a lot for libraries integratinghyperHTML.wire
in their logic, making wires as fast asbind
in most component related use cases.
- added invokable slots to let developers explore patterns through callbacks that will receive a unique live node for weak references while rendered.
- updated domdiff to match petit-dom performance
- up to 3X performance on huge lists
- improved reliability over random changes
- unfortunately there's a +0.6K overall size increase due amount of extra logic involved
- added support for custom CSS properties as object keys.
- worked around TypeScript transpilation bug with Template Literals.
- added the ability to define custom attributes via
hyperHTML.define("hyper-attribute", callback)
, so that<p hyper-attribute=${anyValue}/>
would invokecallback(target, anyValue)
wherep
would be the target.
- added
hyper.Component#dispatch(type, detail)
method to simplify events dispatching between lightweight components, bubbling a cancelable Custom Event with a.component
property that points at the dispatcher, while theevent.currentTarget
will be the first node found within the component render.
- updated domdiff to v1.0
- patched missing
.children
in SVG node in IE / Edge WebReflection#244
- updated domdiff to solve issue #243 (breaking with some sorted list)
- various fixes and changes after changes applied to ECMAScript 2015
- updated domdiff engine to boost performance with segments and lists
- fixed #218 which was a variant of #200
- the
Component.for(obj)
is now created first time vianew Component(obj)
- #216
- declarative hyper.Component via
Component.for(context, uid?)
- #202 - hyperHTML TypeScript information - #201
- fixed #200: textarea/style with initial undefined value
- fixed #198: connected/disconnected events for nested components
- more rigid / explicit RegExp to avoid glitches with self-closing tags
- improved
VOID_ELEMENTS
regular expression (aligned with the viperHTML one)
- fixed
no.js
patch when wrong count of args is passed
- added
no.js
file for environments without the ability to use modern JS or based on other languages such Dart.
- build runs on macOS too
- added umd.js file
- fixed weird SVG case (see #172)
- improved self-closing reliability recycling and sharing attributes RegExp
- updated
domdiff
library to the latest version - implemented self-closing tags (and after various tests)
- ensure attributes values are updated when different from previous one
- avoid the usage of the word
global
in the whole code
- fix scripts with actual content too.
- fix a bug with scripts that don't trigger network requests in both Firefox and Safari (see bug #152)
- created a
Wire
class to handle viadomdiff
multiple wired nodes. - brought back multi nodes per wire, a feature lost since v2.0
- simplified
Component
handling too, making it compatible again with multi wired content. - fixed some check to make IE9+ tests green again
- dropped the
engine
already. Too complex, no real benefits, refactored the whole internal logic to use domdiff instead. Deprecated hyperhtml-majinbuu and solved diffing "forever".
- the whole
hyperHTML.engine
has been refactored to use dom-splicer as an effort to make engine development easier
- the MutationObserver is installed only once and only if there are components that have on(dis)?connect handlers.
- using a new folders convention with
esm/index.js
as main module andcjs/index.js
as transformed artifact. This plays very well with bundlers when youimport {hyper} from 'hyperhtml/esm'
orconst {hyper} = require('hyperhtml/cjs');
- fast changes where prepending or appending same lists; now dropping upfront or removing at the end are part of the fast path too.
- created a simple default merge engine focused on performance
- remove majinbuu as core dependency, created hyperhtml-majinbuu project to swap it back via
hyperHTML.engine = require('hyperhtml-majinbuu')
or as ESM - reduced final bundle size down to 4.1K via brotli
Refactoring following ticket #140