Minor Changes
- #2957
466a2feThanks @kanashimia! - Support returning an object from the<lifecycle>tag'sonMounthandler. The returned properties are assigned onto the lifecycle instance, making values created at mount (element references, third party instances, etc.) available asthisproperties inonUpdateandonDestroy.
Patch Changes
-
#3373
2919dc3Thanks @DylanPiercey! - Fix the debug attribute-value assertion whitelisting anyon*/*Change-named attribute, which let function values render as literal attribute source with no warning (e.g. a spread{checked, valueChange}on a plain input wrotevalueChange="(v) => ..."into the DOM). Handlers the runtime actually consumes never reach the attribute writers, so any function value there now errors in debug, with a hint for unapplied change handlers. -
#3348
a65f4bcThanks @DylanPiercey! - Shrink SSR output slightly by reserving dense accessor ids for closure and change-handler keys instead of prefixing the binding's accessor with a letter. -
#3368
f9061e6Thanks @DylanPiercey! - Fix a duplicatevalueattribute on<let>(e.g.<let/x=input.a value=input.b/>) wiring reactivity to one attribute while generating code for the other, which threw aReferenceErroron the client. It is now a compile error, matching<script>. -
#3367
9d4645bThanks @DylanPiercey! - Fix assignments to a positional tag parameter (e.g.<for|item|>+item = xin a handler) generating code that referenced an undeclared binding, throwingReferenceError: $Change is not definedduring SSR. This is now a compile error pointing at the assignment, since a positional parameter has no object to carry a change handler. -
#3370
5d85bfaThanks @DylanPiercey! - Fix assignments to<id>and<define>tag variables compiling to silent no-ops (the assignment was replaced with its bare right-hand side). They now report the same "readonly and cannot be mutated" compile error as<const>. -
#3366
c7fc346Thanks @DylanPiercey! - Fix RegExp attribute values rendering differently on the client than on the server. SSR special-casedRegExpto write its.sourcewhile the DOM runtime stringified the whole expression, so the first post-hydration update corrupted an SSR-rendered attribute. The special case is removed: both targets now stringify RegExp values the same way (pattern="/^a+$/"). -
#3355
856f2eaThanks @DylanPiercey! - Fix serializedError/AggregateErrorvalues emitting invalid JS when thecause/errorsvalue cannot be written inline (e.g. a circular reference back through the error), which aborted the entire resume script. -
#3356
14329cdThanks @DylanPiercey! - Fix serialization dispatching onval.constructor, which let an ownconstructorproperty (e.g. in parsed JSON data) silently corrupt or drop the value. Values are now classified by their prototype's constructor. -
#3369
924357dThanks @DylanPiercey! - Fix<textarea value=x>body</textarea>silently dropping the author'svalueattribute (the body was appended as a second, last-winsvalue). Combining both is now a compile error.