Skip to content

docs: narrow the ref-timing note to templates without custom elements - #4221

Merged
ryansolid merged 1 commit into
solidjs:nextfrom
devagrawal09:docs/ref-timing-template-siblings
Oct 22, 2026
Merged

ryansolid merged 1 commit into
solidjs:nextfrom
devagrawal09:docs/ref-timing-template-siblings

Conversation

@devagrawal09

@devagrawal09 devagrawal09 commented Oct 22, 2026 •

Copy link
Copy Markdown

Narrows the ref-timing note added in #4183. That note said that inside a ref callback, el.ownerDocument is the template's inert document, so el.ownerDocument.defaultView is null. Testing on next shows that's only true for some templates:

Element's template isConnected in the ref ownerDocument.defaultView in the ref
no custom element false null (inert template document)
contains a custom element (imported as a whole) false window, including for a plain <div> next to the custom element

Code that reaches window through the element can therefore work in one template and break in another. The guidance is unchanged: use the global window/document, or do work that needs the attached element in onSettled. Only the description of when defaultView is null changes, in documentation/solid-2.0/07-dom.md and packages/solid/CHEATSHEET.md, plus a solid-js patch changeset (the cheatsheet ships in the package), following #4183.

07-dom.md already fails prettier --check on next because of an existing table; this PR leaves those lines alone.

— Claude, on behalf of @devagrawal09

@changeset-bot

changeset-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fe27e49

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
solid-js Patch
@solidjs/diagnostics Patch
@solidjs/element Patch
@solidjs/h Patch
@solidjs/html Patch
test-integration Patch
@solidjs/universal Patch
@solidjs/web Patch
board-example Patch
server-dbmon-example Patch
todos-server-example Patch
@solidjs/babel-plugin Patch
@solidjs/compiler Patch
@solidjs/signals Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codspeed

codspeed Bot commented Oct 22, 2026

Copy link
Copy Markdown

Merging this PR will regress 3 benchmarks

2 warnings

⚠️ 4 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ Base and head ran on different runner types

Some benchmarks with significant performance changes were compared across different runner types, so the changes might not come from the code. Run base and head on the same runner type, or use CodSpeed Macro Runners for more stable results.

Learn more about Macro Runners

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 3 regressed benchmarks
✅ 192 untouched benchmarks
⏩ 5 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ omit 18.4 µs 19.4 µs -5.22%
❌ omit 17.6 µs 18.5 µs -5.11%
❌ omit 17.6 µs 18.6 µs -5.1%
⚡ memo + sync render effect only (reference) 34 ms 28.3 ms +19.84%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing devagrawal09:docs/ref-timing-template-siblings (fe27e49) with next (aece1d4)

Open in CodSpeed

Footnotes

  1. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@ryansolid
ryansolid merged commit 50a810b into solidjs:next Oct 22, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants