Search
Star
Feedback
Setup for Free
ยฉ 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Access native html dialogs show/close methods in clickHandler - SolidJS
S
SolidJS
โข
3y ago
โข
14 replies
oneiro
Access native html dialogs show/close methods in clickHandler
Hey folks
,
I am currently using native html dialogs inside my app and am accessing their show
/close methods by using them from window
(e
.g
.
window.myModal.show()
window.myModal.show()
)
. However this is pretty error prone and also doesn
't play well with testing
.
Is there a recommended way on how to use these without accessing the window
? I thought of using
refs
refs
but apparently these refs are not set
, when my handler functions are created
, so they stay undefined
.
Ideally I would export show
/close functions from my component file that could be used everywhere througout the app
.
Any idea what would be a good way to solve this
?
SolidJS
Join
Solid is a declarative reactive Javascript library for creating user interfaces.
12,274
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Attempting to access a stale value from <Show>...
S
SolidJS / support
3y ago
Stuck in 'rendering index.html' in solid-start build
S
SolidJS / support
3y ago
Stale read in <List><Show><List>
S
SolidJS / support
11mo ago
&& in <Show> when condition and typescript?
S
SolidJS / support
2y ago