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

Ability to disable window syncing #298

Open
richard-viney opened this issue Jan 8, 2019 · 2 comments
Open

Ability to disable window syncing #298

richard-viney opened this issue Jan 8, 2019 · 2 comments

Comments

@richard-viney
Copy link

Hi,

We're currently using a small fork of this project that disables syncing across windows. It literally just comments out one line in order to achieve this:

this._addStorageListener();

We'd like to avoid using a fork if possible, so would this be able to be made into a global option? I'll do a PR for the change, just want to get the go-ahead from a maintainer first on the approach. I can't see any existing global options configurable via ember-cli-build.js, but can add that system in the PR.

Alternatively, we could use the existing 'options hash that can be passed to storageFor(), but this appears to be deprecated and tagged for removal in 2.0. If we instead deprecated just the legacyKey property and not the whole options hash then it could be used for this config too. This feels a bit awkward though, as really these are global options, so having to specify them on every call to storageFor() may not be ideal.

Thoughts?

Best,
Richard

@fsmanuel
Copy link
Member

fsmanuel commented Jan 9, 2019

@richard-viney Thanks for the feedback. I think a global option is a good idea.
I added namespace support (which is not released yet) that uses config/environment.js. See the new configuration section in the readme. So I guess that would be a good place to disable the cross window sync.

I'm happy to accept a PR and if you need more help let me know!

@richard-viney
Copy link
Author

Have done an initial PR for this: #299.

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