-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/PR request: onOutputReady event #83
Comments
For example in executable-fragment.js, when calling
Once output is returned from the compiling server seems to work:
Then I can just pass in an
|
Hello, thanks for the feedback! We will have a look. 😊 |
@DavidScales We have PR#84 with stream output. Output will be received by chunks. Do you need update by any chunks or with one event like |
Hmm, I don't know that I necessarily need output in chunks (although that sounds like a good idea). What I really need is to know when the output (chunk or final) has been added to the DOM. Here is my situation visualized, right now I have the editor in an iframe: When output is added to the DOM, the editor expands appropriately, but my iframe doesn't: So I need some event that signals that the DOM has been updated, so that in the child page I can grab the new height and send it to the parent page:
And my parent can listen and adjust the iframe accordingly:
So actually, the I actually need something more like Any ideas for a problem like this? |
I'm using Kotlin Playground in an iframe, and I need to expand the iframe size based on the height of the playground.
Right now I can update the iframe size with postMessage. I use the
onChange
event to check if the playground height has changed (from user's editing code) and update the iframe height accordingly.When the code is compiled and output or exceptions are displayed in the output window, the output window expands to an arbitrary size. Right now I have no way of knowing when that's happened.
I can use the
onConsoleOpen
event to check when the console has been opened, but when anonConsoleOpen
callback is defined, it's fired during the "waitingForOutput" stage:Which is before the actual output/exceptions have been returned, and thus before the final height of the console/output window have been set.
I'm willing to make a PR to create some kind of "onOutputReady" event, if you're open to the idea?
Or of you have a better approach, I'm open to that too. Thanks!
The text was updated successfully, but these errors were encountered: