Hello
Can someone comment on the communication between PCF component runtime and host form's JavaScript environment. It's been stated that "Unlike HTML web resources, code components are rendered as a part of the same context, load at the same time as any other components, providing a seamless experience for the users."
However, the runtime environment's "window" object is actually different than the "window" object exposed to the form script, suggesting that they may not be on same frame and share same JS space. It can be easily confirmed by put a stop point in any PCF code debug session and exam the window object and compare.
If the two Js context are different, is there a way to bridge them, so that it's possible to invoke a public function defined in the form script in the PCF code? I can see using a field and pass the value between them, but seems overkill and the model design would be a bit awkward. With web resource it is possible to use the window.Xrm object to bridge the two environment.
Please comment if you have looked into this issue.
Thanks in advance.