Skip to content

feat(iframe): get run option from parent#2618

Merged
cylon324 merged 5 commits intomasterfrom
serhiiz/ability-to-get-run-options-from-parent
Dec 17, 2024
Merged

feat(iframe): get run option from parent#2618
cylon324 merged 5 commits intomasterfrom
serhiiz/ability-to-get-run-options-from-parent

Conversation

@cylon324
Copy link
Copy Markdown
Contributor

@cylon324 cylon324 commented Dec 16, 2024

now, it will be possible to add to the iframe

<script data-engine-run-options="fetch-options-from-parent=true" src="./preview.web.js"></script>

or start the iframe with src of ./preview.web.js?fetch-options-from-parent=true
then use installRunOptionsInitMessageHandler on the side of the parent window to have a working iframe env.

It will be used to decouple id generation from iframe dom node creation.

Note: iframe initialization in the engine since we have a tech debt here. We have an initializer directly in codux and we need to move it back to make sense.

@cylon324
Copy link
Copy Markdown
Contributor Author

@barak007 requested to have a timeout and init rejection in case of fetch-options-from-parent is true but parent window is not responding

@cylon324
Copy link
Copy Markdown
Contributor Author

@barak007, after discussing with @plisovyi we can argue that:

  • timeout does not contribute to a better user experience. it is the responsibility of the parent to timeout if init is stuck.
  • time out reject will interfere with debug breakpoints
    therefore I will remove the timeout part

@cylon324 cylon324 merged commit 700c0cb into master Dec 17, 2024
@cylon324 cylon324 deleted the serhiiz/ability-to-get-run-options-from-parent branch December 17, 2024 07:05
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.

2 participants