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

add: worker global variable #200

Closed
wants to merge 1 commit into from
Closed

Conversation

zhuangya
Copy link

No description provided.

@garrensmith
Copy link
Collaborator

@zhuangya could you give me a bit of an more idea of what you are trying to do here?

@zhuangya
Copy link
Author

there is no window in web-workers.
the global variable in web-workers is self instead.

the problem is: currently this plugin can not "plug it self to Pouch" automatically.

@garrensmith
Copy link
Collaborator

I'll have to wait on Nolan's call here. I know nothing about web workers.

On Wed, Jun 29, 2016 at 9:01 AM, Ya Zhuang notifications@github.com wrote:

there is no window in web-workers.
the global variable in web-workers is self instead.

the problem is: currently this plugin can not "plug it self to Pouch"
automatically.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#200 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAK9AhkcDgMRp2uOHxWFOAa6w45p6Jntks5qQhhJgaJpZM4JAwJb
.

zhuangya added a commit to zhuangya/upsert that referenced this pull request Jun 29, 2016
@nolanlawson
Copy link
Owner

Sorry, this is not really a use case we intend to support. If you are using web workers, you are advised to explicitly call PouchDB.plugin(...) yourself.

Honestly the only reason we even do the window.PouchDB check is because we wanted to make it less complicated for developers more comfortable with <script> tags. If you're using web workers, then we already assume you're a power user and you can apply the plugin yourself; it's the policy I've taken with all my plugins. Thanks!

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

Successfully merging this pull request may close these issues.

3 participants