Helpers:

Core » Helpers » Events

<apollo-client> listens for apollo-element-connected and apollo-element-disconnected events to manage their client reference.

const APOLLO_ELEMENTS = new Set();

window.addEventListener('apollo-element-connected', event =>
  APOLLO_ELEMENTS.add(event.detail));

window.addEventListener('apollo-element-disconnected', event =>
  APOLLO_ELEMENTS.delete(event.detail));

Properties

type

public
ApolloEventType

controller

public
ApolloController<unknown, unknown> | undefined
Fired when an ApolloElement connects to or disconnects from the DOM

Properties

type

publicstatic
ApolloEventType

controller

public
ApolloController<unknown, unknown> | undefined

Properties

controller

public
ApolloController<unknown, unknown> | undefined

type

public
ApolloEventType
Fired when a controlled element connects to the DOM

Properties

type

publicstatic
ApolloEventType

controller

public
ApolloController<unknown, unknown> | undefined
Fired when a controlled element disconnects from the DOM

Properties

type

publicstatic
ApolloEventType

controller

public
ApolloController<unknown, unknown> | undefined

Exports

js ApolloEvent from events.js

js ApolloElementEvent from events.js

js ApolloControllerEvent from events.js

js ApolloControllerConnectedEvent from events.js

js ApolloControllerDisconnectedEvent from events.js