docs(xapi/watchObject): explicit behavior and param

This commit is contained in:
Julien Fontanet 2022-04-08 10:57:16 +02:00
parent 00b740c549
commit b3cc168571

View File

@ -163,6 +163,10 @@ class Xapi extends Base {
return stopWatch return stopWatch
} }
// Watch an object for changes.
//
// Predicate can be either an id, a UUID, an opaque reference or a
// function.
watchObject(predicate, cb) { watchObject(predicate, cb) {
if (typeof predicate === 'function') { if (typeof predicate === 'function') {
const genericWatchers = this._genericWatchers const genericWatchers = this._genericWatchers