1 viewer
Back to Components
Component · Input

EnablePush

User-gesture-tied button that registers the service worker, prompts for notification permission, subscribes via PushManager, and persists the subscription on the runtime.

Category
Input
Slots
1
States
2
Writer
Legacy
cre8.primitive.enable-push

Preview

Live renderLegacy writer: EnablePush
<EnablePush
  busyLabel="Requesting Browser Permission..."
  label="Enable Real-Time Notifications"
>
  <Button intent="primary" label="Enable Real-Time Notifications" />
</EnablePush>

Anatomy

The named parts of the rendered markup. Recipes style these hooks, and every renderer keeps them stable.

SlotDOM class
root.primitive-enable-push
1 row

States and platforms

The states the contract publishes, the platforms it declares, and the style recipes that dress it.

States
disabledloading
Platforms
web
Recipes
unstyledruntime-console

Renderers

Legacy writer
EnablePush has no shared writer yet: the server renders it through its legacy path, which the WASM DOM does not share.

The example above still needs shared writers for: EnablePush.

Declared adapters. A status is the manifest's declaration, not a measured parity result.

TargetRendererStatus
webreactexperimental
1 row

Accessibility

Native button with a live-region status surface that announces the enrollment outcome.

  • Click handler MUST run inside a user gesture so the browser will honor Notification.requestPermission().
  • Status text is announced through role=status for success and role=alert for failure so assistive tech picks up the result.