[xstate-inspect]: Allow an option for inspect to listen to a custom window object #1478
Unanswered
mattpocock
asked this question in
Ideas
Replies: 2 comments 3 replies
-
I don't know much about Storybook - so it's just a general question: why |
Beta Was this translation helpful? Give feedback.
1 reply
-
@davidkpiano Is there any code I can fork to see if this works? Can't seem to find the source for @xstate/inspect |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
I've been trying to use
@xstate/inspect
to build a storybook addon. It doesn't work at present because the machines configured withdevTools: true
are inside an iframe.@xstate/inspect
is running outside of the iframe.From a quick twitter conversation with @davidkpiano, it appears that
@xstate/inspect
is listening for messages passed to thewindow
object. This fails when the machines are in an iframe, because they're on a differentwindow
.Solution
Allow for a custom
window
to be passed toinspect
so that it can listen for messages there instead.Beta Was this translation helpful? Give feedback.
All reactions