# Class webdriver.promise.Node_

code »

    webdriver.promise.Promise.<(T|null)>
      └ webdriver.promise.Deferred
          └ webdriver.promise.Node_

All implemented interfaces:
  `webdriver.promise.Thenable.<(T|null)>`

A single node in an `webdriver.promise.ControlFlow`'s task tree.

## Constructor

webdriver.promise.Node_ ( flow )

Parameters
flow: `!webdriver.promise.ControlFlow` The flow this instance belongs to.

Show:Public Protected Private

## Instance Methods

### Defined in `webdriver.promise.Node_`

code »getParent ( ) ⇒ `webdriver.promise.Node_`

Returns
This node's parent.

code »getRoot ( ) ⇒ `!webdriver.promise.Node_`

Returns
The root of this node's tree.

code »setParent ( parent )

Parameters
parent: `webdriver.promise.Node_` This node's new parent.

### Defined in `webdriver.promise.Deferred`

code »errback ( opt_error )

Rejects this promise. If the error is itself a promise, this instance will be chained to it and be rejected with the error's resolved value.

Parameters
opt_error: `*=` The rejection reason, typically either a `Error` or a `string`.

code »fulfill ( opt_value )

Resolves this promise with the given value. If the value is itself a promise and not a reference to this deferred, this instance will wait for it before resolving.

Parameters
opt_value: `T=` The fulfilled value.

code »reject ( opt_error )

Rejects this promise. If the error is itself a promise, this instance will be chained to it and be rejected with the error's resolved value.

Parameters
opt_error: `*=` The rejection reason, typically either a `Error` or a `string`.

code »removeAll ( )

Removes all of the listeners previously registered on this deferred.

Throws
`Error` If this deferred has already been resolved.

### Defined in `webdriver.promise.Promise.<(T|null)>`

code »cancel ( reason )

Parameters
reason

code »isPending ( ) ⇒ `boolean`
code »then ( opt_callback, opt_errback )

Parameters
opt_callback opt_errback

code »thenCatch ( errback )

Parameters
errback

code »thenFinally ( callback )

Parameters
callback

## Instance Properties

### Defined in `webdriver.promise.Node_`

code »parent_ : `webdriver.promise.Node_`

This node's parent.

### Defined in `webdriver.promise.Deferred`

code »webdriver.promise.Deferred.prototype.promise : `webdriver.promise.Promise.`

Represents the eventual value of a completed operation. Each promise may be in one of three states: pending, resolved, or rejected. Each promise starts in the pending state and may make a single transition to either a fulfilled or rejected state, at which point the promise is considered resolved.

## Static Properties

code »webdriver.promise.Node_.superClass_ : `webdriver.promise.Deferred.prototype`