@netflix/x-element
Advanced tools
Changelog
[1.1.2] - 2024-12-16
??foo="${bar}"
syntax in the default
template engine. This is functionally equivalent to the nullish
updater from
the default template engine and will replace that functionality later (#204).ifDefined
updater now deletes the attribute on null
in addition to
undefined
in the default template engine. This makes it behave identically
to nullish
in the default template engine. However, both updaters are
deprecated — the ??attr
binding should be used instead when using the
default template engine (#204).textarea
is more strict in the default template engine.
This used to be handled with some leniency for newlines in templates —
<textarea>\n ${value} \n</textarea>
. Now, you have to interpolate exactly —
<textarea>${value}</textarea>
(#219).DocumentFragment
within the template engine.
In particular, this was added to enable advanced flows without needing to
bloat the default template engine interface (#207, #216).ifDefined
and nullish
updaters are deprecated, update templates to use
syntax like ??foo="${bar}"
(#204).repeat
and map
updaters are deprecated, use native arrays (#204).unsafeHTML
and unsafeSVG
updaters are deprecated, bind a
DocumentFragment
value instead (#207, #216).plaintext
tag is no longer handled. This is a deprecated html tag which
required special handling… but it’s unlikely that anyone is using that (#220).live
updater is deprecated. Use a delegated event listener for the
change
event if you need tight control over DOM state in forms (#208).unsafe
back to null
(#223).map
updater throws immediately when given non-array input for the
default template engine. Previously, it only threw when it was bound (#222).map
updater throws if the return value from the provided identify
callback returns a duplicate value (#218).Changelog
[1.1.1] - 2024-11-09
connectedCallback
would be called
before initial dom updates could be applied. In particular, this caused issues
with default initial values causing unexpected observe
callbacks (#197).Changelog
[1.1.0] - 2024-10-18
styles
getter for adoptedStyleSheets
ergonomics
(#52).x-element.js
file is now “typed” via JSDoc. The validity of the JSDoc
comments are linted alongside the rest of the code and the annotations there
are exported into a generated x-element.d.ts
file. Previously, that file was
hand-curated.map
function now works with properties / attributes bound across
template contexts (#179).x-element.d.ts
file now reflects the actual interface. Previously, it
has some issues (e.g., improper module export).Changelog
[1.0.0] - 2024-02-29
1.x
is locked down.