---
name: "up.Layer.prototype.off"
area: "API"
kind: "Instance method"
parent: "up.Layer class"
url: "https://unpoly.com/api/up.Layer.prototype.off"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.Layer class](https://unpoly.com/api/up.Layer.md)</nav>

# up.Layer.prototype.off(types, listener)

Unbinds an event listener previously bound with [`up.Layer#on()`](https://unpoly.com/api/up.Layer.prototype.on.md).

---

## Parameters {#parameters}

### Observed events {#parameters-observed-events}

#### types {#types}

(required)

The event types to unbind.

Multiple event types may be passed as either a space-separated string (`'foo bar'`), a comma-separated string (`'foo, bar'`) or as an array of types (`['foo', 'bar']`).

Type: string | [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<string>

### Listener {#parameters-listener}

#### listener {#listener}

(required)

The listener function to unbind.

You must pass a reference to the same function reference that was used to register the listener.

Type: Function(event, [element], [[data](https://unpoly.com/learn/data.md)])

