Repository navigation
@solidjs/html@2.0.0-rc.14
Pre-releasePatch Changes
-
a5d0e76: Zero-argument functions passed to component props named
on,only,once, etc. are now wrapped in getters like any other dynamic prop (#3728). Theon*exemption on components now covers onlyonXxxhandler names (an uppercase letter afteron), so<${Loading} on=${() => key()}>re-keys the boundary whenkey()changes. Native elements are unchanged: everyon*prop is still passed through as an event handler. A lowercaseonclickpassed to a component is now wrapped in a getter; name itonClickor give the handler a parameter. -
6be8486: Fix the tokenizer staying in raw text mode after a self-closing raw text element such as
<textarea />, which swallowed the rest of the template as text. -
4f67697: Breaking: only
onfollowed by an uppercase letter (onClick,onPointerDown) is an event handler. Lowercaseon*names (onclick,onmouseover) are plain attributes everywhere:- Both compilers compile
onclick={expr}like any other attribute (setAttribute, reactive whenexpris dynamic) instead of binding a delegated or native event, and SSR renders it as an escaped attribute instead of dropping it. A leftover 1.xon:click={fn}is likewise a plain namespaced attribute (it previously compiled toaddEventListener(":click", fn)). @solidjs/webspread/assignset lowercaseon*keys as attributes, the server spread walk renders them, anduseHeadapplies lowercaseon*attributes (camelCase handler names stay skipped).ssrAttributeescapes a function value instead of interpolating its source raw.@solidjs/htmland@solidjs/helements wrap a function passed to a lowercaseon*in a getter like any other attribute; onlyonXxxandrefare exempt.@solidjs/htmlcomponents follow@solidjs/h's rule: every zero-argument function prop,onXxxhandlers andrefincluded, is a getter, so a component handler must declare its event argument (onClick=${e => …}).- New dev-only check
LOWERCASE_EVENT_ATTRIBUTE(added to theDiagnosticCodeunion): warns once per attribute name when a function is set on a lowercaseon*(oron:) attribute, naming the camelCase handler to use.
- Both compilers compile
-
Updated dependencies [ecb68a1]
-
Updated dependencies [d4b10b5]
-
Updated dependencies [2eb6e00]
-
Updated dependencies [721eb06]
-
Updated dependencies [365f37d]
-
Updated dependencies [98d35b9]
-
Updated dependencies [b57eb2e]
-
Updated dependencies [3c1d512]
-
Updated dependencies [3c1d512]
-
Updated dependencies [3c1d512]
-
Updated dependencies [3c1d512]
-
Updated dependencies [3c1d512]
-
Updated dependencies [9d89df7]
-
Updated dependencies [7233451]
-
Updated dependencies [7233451]
-
Updated dependencies [3c1d512]
-
Updated dependencies [3c1d512]
-
Updated dependencies [3c1d512]
-
Updated dependencies [9d89df7]
-
Updated dependencies [7233451]
-
Updated dependencies [9d89df7]
-
Updated dependencies [9d89df7]
-
Updated dependencies [7233451]
-
Updated dependencies [3c1d512]
-
Updated dependencies [1b9ceb6]
-
Updated dependencies [203ab1a]
-
Updated dependencies [7233451]
-
Updated dependencies [7233451]
-
Updated dependencies [7233451]
-
Updated dependencies [7233451]
-
Updated dependencies [7233451]
-
Updated dependencies [7233451]
-
Updated dependencies [3c7631a]
-
Updated dependencies [7233451]
-
Updated dependencies [7233451]
-
Updated dependencies [7233451]
-
Updated dependencies [e44b2e4]
-
Updated dependencies [01e80a6]
-
Updated dependencies [be82cf3]
-
Updated dependencies [4f67697]
-
Updated dependencies [41fdf96]
-
Updated dependencies [53ef0e6]
-
Updated dependencies [2656284]
-
Updated dependencies [9338c00]
-
Updated dependencies [7addcc6]
-
Updated dependencies [6f77b1b]
-
Updated dependencies [537e945]
-
Updated dependencies [7233451]
-
Updated dependencies [8d66ae5]
- @solidjs/web@2.0.0-rc.14