Livecode Demo of two way javascript communication?
David Bovill
david.bovill at gmail.com
Fri Jan 26 11:15:29 EST 2024
The scenario would be events like resize, or a button click in the html
page triggering a handler in the Livecode wasm export. The other way round
would ve a Livecode handler in the exported wasm widget calling a
javascriot function in the surrounding Web page.
My understanding in other contexts is that you use the postMessage Web api
for this type of thing -
https://www.google.com/url?q=https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage&sa=U&ved=2ahUKEwiE5eCSufuDAxX7UkEAHbtmBvIQFnoECAoQAg&usg=AOvVaw09QGMScP0-9YwJuHAC-sIE
Apart from triggering handlers in both directions passing (json) data in
both directions is needed.
On Thu, 25 Jan 2024, 20:35 Andreas Bergendal via use-livecode, <
use-livecode at lists.runrev.com> wrote:
> I’ve created some web deployments where the web page interacts with the
> stack e.g. in the sense that a change of the browser window rect triggers a
> resizeStack message in the stack.
>
> But I’m not sure if by bidirectional you mean that actions in the stack
> should also affect the web page in some way? Could you give an example of
> what you have in mind?
>
>
> > 24 jan. 2024 kl. 12:47 skrev David Bovill via use-livecode <
> use-livecode at lists.runrev.com>:
> >
> > Is there a demo out there for simple bidirectional interaction between a
> > web page and a recent stack exported as wasm? Anyone experimenting with
> > this?
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list