# register

Registers in CurrentRenderDocument's registry and captures the layer's services.
Provides no services; use the custom element through ordinary HTML templates.
The layer's Scope owns every connected instance. Closing it stops rendering
and deactivates this class; browsers cannot unregister a custom element.
Disconnect interrupts subscriptions/listeners; reconnect waits for cleanup
before starting a fresh view. Failures dispatch typed:error with a Cause
in CustomEvent.detail. Native template event handlers work without an adapter.
Shadow roots retain slotted light children. Light mode owns all host children.

## Signatures

```ts
export declare function register<F extends Fields, View extends Renderable.Any>(definition: Definition<F, View>): Layer.Layer<never, RegistrationError, Exclude<Exclude<Renderable.Services<View>, RenderTemplate>, Scope.Scope>>;
```


