# `Fluffy.Event`
[🔗](https://github.com/ftes/fluffy/blob/v0.8.0/lib/fluffy/event.ex#L1)

Event descriptions shared by waits and listeners.

Constructors accept an optional unary predicate. A false or nil result skips
the event. Predicates inspect event metadata; use ordinary assertions on the
awaited value to check its contents.

Download events support both backends. Other events require Playwright.
Request and response registrations accept `scope: :page` (the default) or
`scope: :context`. Page events observe the context; all other events observe
the page selected when registering.

# `option`

```elixir
@type option() :: {:timeout, non_neg_integer()} | {:scope, :page | :context}
```

# `t`

```elixir
@type t() :: %Fluffy.Event{predicate: (term() -&gt; term()) | nil, type: type()}
```

# `type`

```elixir
@type type() ::
  :download
  | :popup
  | :page
  | :frame_navigated
  | :dialog
  | :file_chooser
  | :request
  | :response
```

# `dialog`
*Playwright only* 

```elixir
@spec dialog((term() -&gt; term()) | nil) :: t()
```

Describes a dialog event, optionally filtered by a unary predicate.

# `download`

```elixir
@spec download((term() -&gt; term()) | nil) :: t()
```

Describes a download event, optionally filtered by a unary predicate.

# `file_chooser`
*Playwright only* 

```elixir
@spec file_chooser((term() -&gt; term()) | nil) :: t()
```

Describes a file_chooser event, optionally filtered by a unary predicate.

# `frame_navigated`
*Playwright only* 

```elixir
@spec frame_navigated((term() -&gt; term()) | nil) :: t()
```

Describes a frame_navigated event, optionally filtered by a unary predicate.

# `page`
*Playwright only* 

```elixir
@spec page((term() -&gt; term()) | nil) :: t()
```

Describes a page event, optionally filtered by a unary predicate.

# `popup`
*Playwright only* 

```elixir
@spec popup((term() -&gt; term()) | nil) :: t()
```

Describes a popup event, optionally filtered by a unary predicate.

# `request`
*Playwright only* 

```elixir
@spec request((term() -&gt; term()) | nil) :: t()
```

Describes a request event, optionally filtered by a unary predicate.

# `response`
*Playwright only* 

```elixir
@spec response((term() -&gt; term()) | nil) :: t()
```

Describes a response event, optionally filtered by a unary predicate.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
