Skip to content
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

Library doesn't work when using iframe as normal app #34

Closed
jcubic opened this issue Mar 15, 2022 · 3 comments
Closed

Library doesn't work when using iframe as normal app #34

jcubic opened this issue Mar 15, 2022 · 3 comments
Labels

Comments

@jcubic
Copy link
Owner

jcubic commented Mar 15, 2022

So I've created this app:

sysend.on('input', text => {
    console.log({text});
    input.value = text;
});
input.addEventListener('input', () => {
    console.log(input.value);
    sysend.broadcast('input', input.value);
});

but it doesn't synchronize from page to iframes. It only works for iframes to the main page.
Probably because iframe works in proxy mode, not as an app.

It should work somehow, so you can demo the library.

@jcubic jcubic added the bug label Mar 15, 2022
@jcubic
Copy link
Owner Author

jcubic commented Mar 23, 2022

Because of this Codepen demos doesn't work:

https://codepen.io/jcubic/pen/BaJQrYV?editors=1111

@jcubic
Copy link
Owner Author

jcubic commented Mar 23, 2022

The solution may be a function that should and will be called on a proxy file.
Maybe proxy without argument.

sysend.proxy()

this will indicate proxy file.

jcubic added a commit that referenced this issue Mar 25, 2022
@jcubic jcubic closed this as completed Mar 25, 2022
@jcubic
Copy link
Owner Author

jcubic commented Mar 25, 2022

The issue is fixed. Will create another demo. This will probably also allow using the library on Codepen and CodeSandbox (for now in single way channel, allow single iframe proxy is tracked in #37)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant