Breaking Change: This version contains an API change that breaks with prior versions.
- Callback functions (render callbacks, app handlers, ...) receive a single Context parameter that can be consumed directly but is intended to be consumed using parameter destructuring. This introduces an API breaking change.
- Upgraded almost all build dependencies (no impact on production code)
- Improved code packaging process
- Moved to new mono-repo
updateElement
emits custom eventsupdatestart
andupdateend
to notify listeners when an update is applied to an element- custom elements created using
define
emit custom eventsconnect
anddisconnect
to notify listeners when the custom element is connected/disconnected from the DOM
Breaking Change: This version contains an API change that breaks with prior versions.
define
accepts an object as the optional last parameter allowing you to set observed (HTML element) attributes as well as observed (JavaScript element) properties- Added performance tests to benchmark render performance
- Fix handling of
null
andundefined
when updating bound attributes of custom elements - Improve bundles
- Rework examples
- Fix
null
value error when usingnull
inside a placeholder ofwecco.html
Breaking Change: This version contains an API change that breaks with prior versions.
- Change signature of app functions to always receive
ctx
as the first parameter. This allows a very much easier use ofbind
when building views. null
is allowed for functions that return anElementUpdate
. Anull
value causes no change in the element`s DOM.- Minor dev dependency upgrades
- Example uses vite.js (instead of webpack)
- Upgraded several dependencies (security fixes)
- fix: preserve case when setting properties from HTML template attributes
- fix: send
update
event for custom elements but not their sub-trees
- fix: only send
update
event for elements connected to a document root
- fix:
removeAllChildren
also works with non-Element
s such as Shadow root or other document-fragments.
- trigger
update
event when rendering shadow root
- fix minor build system details to conform to github npm registry
- updated package scope to
@weccoframework
- add support for omitting attributes if a placeholder returns
undefined
ornull
- add support for setting Javascript properties on HTML elements created with
html
-tagged strings
- add support for options passed to
addEventListener
- add support for asynchronous apps (model creation and updates)
- fixed an issue when re-rendering a template containing a placeholder with text, nested template and text again
- only update attribute value when bound value changes
- fix type signature of app updater to include
NoModelChange
- introduce
NoModelChange
value to skip rendering of an app
- fix handling of nested html tagged strings with toplevel mixed content
- fix null reference error when updating node bindings
- fix: remove previous content when applying text content to node binding and non-text node found
- complete rewrite of
html
string tag to support partial updates which greatly improves performance
** Breaking Change: @mount
special binding dropped and replaced with @update
event
- fix missing export of
UpdateTarget
- fix redundant emit of
mounted
event when embedding oneHtmlTemplate
s inside another one
- fix type definition of how
ElementUpdate
handles arrays
ElementUpdate
can be an array of update requests which will be applied in order
update
callback running as part of an app receive acontext
parameter to emit other messages
- Removed
controller
package in exchange for newapp
package
- Upgraded all dependencies
- Fixed event handler management on DOM updates
- Added support for invocation chaining on several objects
- Fixed
@mount
with nested elements
@mount
event (see https://bitbucket.org/wecco/core/issues/1/mount-special-event)
context
Parameter supportsonce
helper method
define
method accepts multiple observed attribute names as rest parameter
- Execute an element's render callback with a delay thus collecting multiple data changes into one render call
- Fixed bug that render callback is triggered twice when an observed attribute is changed via DOM interaction
Breaking Change: Changed signature of render callback.
- Added support for element events send via HTML
CustomEvent
objects.
- Added caching support for HTML rendered using backticks and custom string tag
- Fixed bug in todo-example concerning state handling
- Added support to bind HTML attribute values to model properties
- Added examples
Initial version