[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/inspectto build a storybook addon. It doesn't work at present because the machines configured withdevTools: trueare inside an iframe.@xstate/inspectis running outside of the iframe.From a quick twitter conversation with @davidkpiano, it appears that
@xstate/inspectis listening for messages passed to thewindowobject. This fails when the machines are in an iframe, because they're on a differentwindow.Solution
Allow for a custom
windowto be passed toinspectso that it can listen for messages there instead.Beta Was this translation helpful? Give feedback.
All reactions