# HydrationElement

Defines the hydration element state contract.

## Signatures

```ts
export interface HydrationElement {
    getAttribute(name: string): string | null;
    setAttribute(name: string, value: string): void;
    removeAttribute(name: string): void;
}
```

## Why

Defines the minimal standards-based attribute surface required to restore state, allowing DOM
elements and compatible hosts to participate.

## Ownership and lifetime

HydrationElement is a contract and performs no acquisition. Implementations retain the errors,
services, interruption, and Scope requirements expressed by its members.

## Method: getAttribute

Reads an encoded hydration attribute from the host.

## Method: getAttribute: Why

Reads the serialized payload from the host during client restoration.

## Method: getAttribute: Ownership and lifetime

This declaration acquires no resources. Effects represented by the contract retain their own
services and Scope requirements.

## Method: removeAttribute

Removes a consumed hydration attribute from the host.

## Method: removeAttribute: Why

Removes consumed hydration data so it cannot be restored twice from stale markup.

## Method: removeAttribute: Ownership and lifetime

This declaration acquires no resources. Effects represented by the contract retain their own
services and Scope requirements.

## Method: setAttribute

Writes an encoded hydration attribute to the host.

## Method: setAttribute: Why

Writes a server-produced hydration payload through the host's native attribute contract.

## Method: setAttribute: Ownership and lifetime

This declaration acquires no resources. Effects represented by the contract retain their own
services and Scope requirements.
