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

$.task.js - global.postMessage conflicting with external scripts #95

Closed
kigorw opened this issue Aug 6, 2015 · 2 comments
Closed

$.task.js - global.postMessage conflicting with external scripts #95

kigorw opened this issue Aug 6, 2015 · 2 comments

Comments

@kigorw
Copy link

kigorw commented Aug 6, 2015

We use Babel Promises in Chrome extension. Some sites listens this messages and some of them expect certain data types in e.data and use something like e.data.split() so when e.data is int user gets JavaScript error.
I would be cool to replace this mechanism with something more isolated.

@zloirock
Copy link
Owner

zloirock commented Aug 6, 2015

You can propose more safe and enough fast task implementation? Maximum that I can do - set location.origin as origin parameter and convert data to string. In the future Promise implementation will use microtasks based on MutationObserver, but tasks based on postMessage should be used in some other places.

@zloirock
Copy link
Owner

zloirock commented Aug 6, 2015

Possible use MessageChannel (currently used only for WebWorkers), but it can cause some problems, need test it.

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

No branches or pull requests

2 participants