Patch Changes
-
#3822
352bca2Thanks @DylanPiercey! - Single-letter camelCase event attributes (onX) now compile as event handlers, matching the runtime's event detection. -
#3866
0eced38Thanks @DylanPiercey! - Page asset tags are now emitted after a leading<!doctype>; a page entry without a literal<head>previously wrote them ahead of the doctype, silently putting the document in quirks mode. -
#3858
7799b0aThanks @DylanPiercey! - Carriage returns in server-rendered attribute values are now escaped as&[#13](https://github.com/marko-js/marko/issues/13);; the HTML parser previously normalized them to line feeds, diverging from client rendering. -
#3841
dde49ddThanks @DylanPiercey! - A checkbox controlled through a spreadcheckedValuealongside static attributes no longer unchecks when unrelated state updates; the stale-attribute removal now recognizescheckedValueas owningchecked, matching full spreads. -
#3839
3cc6b1cThanks @DylanPiercey! - Mixing refined and plain bound attributes on the same variable (value:parseInt:=xandvalue:=x) now generates a change handler per refinement instead of reusing the first one for all. -
#3819
9cb5d2aThanks @DylanPiercey! - Align cheatsheet.md prose with the documentation style guidelines (sentence-case emphasis, short headings, no em-dashes); content unchanged. -
#3835
3e69b12Thanks @DylanPiercey! - An empty key in a class object (class={ "": cond }) no longer throws on client render; it is dropped, matching server rendering. -
#3837
d13cc15Thanks @DylanPiercey! - A control-flow branch whose entire markup is anObject.prototypemember name (e.g. bare textconstructor) no longer crashes client rendering; the clone cache key is prefixed so inherited properties can't collide. -
#3860
ae57723Thanks @DylanPiercey! - Caret restoration in controlled inputs now handles astral letters and digits (CJK Extension B, math alphanumerics, ...); previously the cursor jumped to the end of the value on edits near them. -
#3843
877f821Thanks @DylanPiercey! - A custom tag invoked with arguments and a body (<my-tag("a")>hi</my-tag>) is now a compile error instead of silently dropping the body; dynamic tags still allow arguments with fallback content. -
#3863
5f8f1b5Thanks @DylanPiercey! - Reusing a value that was serialized as a deferredMap/Setmember (e.g. a member of a circular collection) in a later stream flush no longer crashes the serializer. -
#3825
f1b18dbThanks @DylanPiercey! - Events whose type collides with aFunctionproperty (on-name,on-length, …) now register their delegated listener instead of silently never firing. -
#3829
295b86eThanks @DylanPiercey! - Debug builds now resume event handlers on camelCase dynamic native tags (e.g. a dynamic<linearGradient>inside<svg>); the debug element accessor casing previously disagreed between server and resume, leaving handlers silently dead. -
#3832
f1aa0ecThanks @DylanPiercey! - State read by event handlers spread onto a dynamic tag from a<const>now serializes for resume; previously the handlers were wired after resume but read their state asundefined. -
#3868
6adab5aThanks @DylanPiercey! - Fix a client-side crash or destroyed sibling elements when a template contains a placeholder that statically evaluates to an empty string (e.g.${""}or${NaN}): it rendered no text but still claimed a walk step, shifting every later step in the section by one. -
#3817
647d520Thanks @DylanPiercey! - Readingevent.currentTargetin a native tag event handler is now a type error whose message points at the handler's second parameter (the typed element), since event delegation makescurrentTargetunusable at runtime. -
#3791
de3bb9fThanks @DylanPiercey! - Fix dead markojs.com links in compile errors and editor autocomplete:/docs/syntax/URLs now point at the language reference, and core-tag anchors account for headings that differ from the tag name. -
#3811
80edc6aThanks @DylanPiercey! - FixSorted.isSupersetrejecting valid supersets, and give controllable change handlers (including on dynamic tags) their own serialize reasons so their functions stay registered now that intersection pruning is accurate. Bound native inputs serialize slightly less, and computed bound attributes (value:=state[key]) now register their handlers. -
#3823
0fd5689Thanks @DylanPiercey! - A falsy<for by>value (e.g.by=cond && "id") now means "no key" in the browser runtime, matching server rendering, instead of throwingby is not a functionon update. -
#3844
de8fb5fThanks @DylanPiercey! - Reading a loop parameter anywhere in a<for by=...>expression (e.g.by=item.id) is now a compile error with a code frame, instead of compiling clean and throwing aReferenceErrorat first render. -
#3820
9567e06Thanks @DylanPiercey! - Debug builds now error when a<for>tag'sfromorstepattribute is a non-number, instead of silently concatenating indices. -
#3824
90d9630Thanks @DylanPiercey! - Debug server rendering now validates spread attributes the same way the browser runtime does: invalid attribute names error even with void values, and mutually exclusive controllable attributes split across a spread and static attributes are reported. -
#3854
ede4050Thanks @DylanPiercey! -<if value=cond>,<else-if value=cond>and<show value=cond>now compile like the=shorthand, matching every other core tag's handling of the written-out attribute. -
#3865
1f67f47Thanks @DylanPiercey! - A streaming sink that throws (e.g. a client disconnect mid-write) no longer degrades progressive streaming for other renders in flight on the same server. -
#3857
2505756Thanks @DylanPiercey! - A native tag whosecontent=attribute evaluates statically (e.g.<div content=undefined/>) no longer aborts the browser-output compile with an internal error. -
#3760
efe38e8Thanks @DylanPiercey! - Report the underlying error when serialization fails while flushing a Class-API page that renders Tags-API content, instead of emitting a resume script that fails in the browser asM is not defined. -
#3834
ae8e0f4Thanks @DylanPiercey! - Fix children consuming input only through a rest pattern or direct alias: their input groups now map their real feeders (restoring resume serialization for fed values), and the generated$inputalias export no longer references its target before declaration. -
#3772
c72635dThanks @DylanPiercey! - Fix aCannot read properties of undefined (reading 'serializeState')crash when a Class-API component rendering Tags-API content is rendered directly — throughrenderToStringor@marko/testing-library— rather than as a page with<init-components>. -
#3838
ce12adaThanks @DylanPiercey! - Registered object/class methods with computed or static keys now keep those flags in browser output; a computed-key handler previously lowered to a literal key and silently wired nothing. -
#3830
14f004bThanks @DylanPiercey! - Resume-only pages containing a dynamic native tag with spread attributes no longer crash during hydration:_resume_dynamic_tagnow enables branch visit processing, which the bundler could previously tree-shake away along with_dynamic_tag. -
#3859
1b9348bThanks @DylanPiercey! - Resume registration ids are now unambiguous; previously two same-named tag variables (e.g. two<div/x>element refs) or bindings with_-joined names could share one id, silently resolving to the wrong value after resume. -
#3826
eab1c0bThanks @DylanPiercey! - A<return valueChange>that becomes falsy now revokes the tag-variable change handler, so later parent assignments are readonly (debug error / no-op) instead of silently mutating through the stale handler. -
#3821
b27066fThanks @DylanPiercey! - A duplicatevalue/valueChangeattribute on<return>is now a compile error instead of producing code that throws aReferenceErrorat render time. -
#3800
2a1552eThanks @DylanPiercey! - Reword the tag-variable compile errors in the reference tracker to name the variable and link the docs — including the former "Cannot assign to hoisted tag variable.", which now explains the positional rule. -
#3813
45b91f4Thanks @DylanPiercey! - Share the await frame scheduler betweenaddAwaitCounterand_await_promise, slightly shrinking dom bundles that use<await>. -
#3790
14475c0Thanks @DylanPiercey! - Declare atypesstub for the<show>tag so editors andmtctype-check its input like the other core tags. -
#3850
6fd0a30Thanks @DylanPiercey! - Fix hydration when the Class runtime initializes before the Tags runtime: a class component rerendering in the browser now forces the tags runtime to resume first, so revived content (input.renderBody) and existing tags branches are found instead of crashing withInvalid dynamic tag valueor discarding server-rendered DOM. -
#3789
70b2887Thanks @DylanPiercey! - Name the actual handler attribute (checkedChange,checkedValueChange,openChange, …) in the server-side controllable debug assertion instead of always reportingvalueChange. -
#3828
d0a2946Thanks @DylanPiercey! - Theloadimport attribute is now stripped from compiled HTML output; unbundled server modules previously keptwith { load: ... }, which Node rejects at import time. -
#3852
014a6adThanks @DylanPiercey! - Type stub fixes for editors and@marko/type-check: valueless<let/x/>type-checks,<html-comment>/<html-script>/<html-style>tag variables type as element getters, and<try>'s@catchparameter isanyso readingerr.messageis clean. -
#3855
61c333dThanks @DylanPiercey! - Escape sequences in a template-literal tag name (e.g.<${`h\x31`}>) are now decoded instead of reaching the emitted markup verbatim. -
#3797
f01d949Thanks @DylanPiercey! - Error at compile time when a<try>receives an attribute tag other than<@placeholder>/<@catch>, with a near-miss suggestion — a typo previously compiled clean and silently dropped the pending/error UI. -
#3806
8398441Thanks @DylanPiercey! - Validate theloadimport attribute (trigger syntax and import specifiers) even whenlinkAssetsis not configured, instead of silently falling back to an eager import. -
#3782
b99657eThanks @DylanPiercey! - Warn in debug builds when aNaNor bigint0ntext or style value is silently dropped from the output. -
#3796
3ceed71Thanks @DylanPiercey! - Warn at compile time when a<script>body returns a cleanup function, which is discarded; point at$signal.onabortand<lifecycle onDestroy>. -
Updated dependencies [
4bc0479,877f821,1a881a5,97ab05e,eb25d4c,05f3a1a,798521c]:- @marko/compiler@5.41.18