Tracker.autorun

Client Tracker.autorun(runFunc, [options]) import { Tracker } from 'meteor/tracker' Source Run a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning. Arguments runFunc Function The function to run. It receives one argument: the Computation object that will be returned. Options onError Function Optional. The function to run when an error happens in the Computation. The only argument it r

this.removed

Server this.removed(collection, id) Source Call inside the publish function. Informs the subscriber that a document has been removed from the record set. Arguments collection String The name of the collection that the document has been removed from. id String The ID of the document that has been removed.

this.stop

Server this.stop() Source Call inside the publish function. Stops this client's subscription and invokes the client's onStop callback with no error.

this.ready

Server this.ready() Source Call inside the publish function. Informs the subscriber that an initial, complete snapshot of the record set has been sent. This will trigger a call on the client to the onReady callback passed to Meteor.subscribe, if any.

this.unblock

Server this.unblock() Source Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.

this.setUserId

Server this.setUserId(userId) Source Set the logged in user. Arguments userId String or null The value that should be returned by userId on this connection.

this.isSimulation

Anywhere this.isSimulation Source Access inside a method invocation. Boolean value, true if this invocation is a stub.

this.onStop

Server this.onStop(func) Source Call inside the publish function. Registers a callback function to run when the subscription is stopped. Arguments func Function The callback function

this.error

Server this.error(error) Source Call inside the publish function. Stops this client's subscription, triggering a call on the client to the onStop callback passed to Meteor.subscribe, if any. If error is not a Meteor.Error, it will be sanitized. Arguments error Error The error to pass to the client.

this.connection

Server this.connection Source Access inside the publish function. The incoming connection for this subscription.