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
updateElementemits custom eventsupdatestartandupdateendto notify listeners when an update is applied to an element- custom elements created using
defineemit custom eventsconnectanddisconnectto 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.
defineaccepts 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
nullandundefinedwhen updating bound attributes of custom elements - Improve bundles
- Rework examples
- Fix
nullvalue error when usingnullinside 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
ctxas the first parameter. This allows a very much easier use ofbindwhen building views. nullis allowed for functions that return anElementUpdate. Anullvalue 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
updateevent for custom elements but not their sub-trees
- fix: only send
updateevent for elements connected to a document root
- fix:
removeAllChildrenalso works with non-Elements such as Shadow root or other document-fragments.
- trigger
updateevent 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
undefinedornull
- 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
NoModelChangevalue 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
htmlstring 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
mountedevent when embedding oneHtmlTemplates inside another one
- fix type definition of how
ElementUpdatehandles arrays
ElementUpdatecan be an array of update requests which will be applied in order
updatecallback running as part of an app receive acontextparameter to emit other messages
- Removed
controllerpackage in exchange for newapppackage
- Upgraded all dependencies
- Fixed event handler management on DOM updates
- Added support for invocation chaining on several objects
- Fixed
@mountwith nested elements
@mountevent (see https://bitbucket.org/wecco/core/issues/1/mount-special-event)
contextParameter supportsoncehelper method
definemethod 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
CustomEventobjects.
- 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