Skip to content

adapt doc to new javascript api #1

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

Open
wants to merge 2 commits into
base: source
Choose a base branch
from

Conversation

rom1504
Copy link
Member

@rom1504 rom1504 commented Oct 14, 2016

No description provided.

@@ -2701,6 +2666,10 @@ DELETE /listen/:channel_id/:resource_type/:resource_id
client.unwatchCorpus('555daefff80f910100d741d6')
```

```javascript
client.unwatchCorpus('555daefff80f910100d741d6', listener);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to pass listener to unwatchCorpus?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you meant callback -- it does not have to be the same function as the one used for watchCorpus, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the same function passed to watchCorpus. https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener works that way, the function passed to addEvenListener needs to be passed to removeEventListener.
I guess the python API remove all the listeners ?

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.

2 participants