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));
ApolloEvent
Properties
type
ApolloEventType
controller
ApolloController | undefined
ApolloElementEvent
Fired when an ApolloElement connects to or disconnects from the DOM
Properties
type
inherited from ApolloEventApolloEventType
type
inherited from ApolloEventApolloEventType
controller
inherited from ApolloEventApolloController | undefined
ApolloControllerEvent
Properties
controller
inherited from ApolloEventApolloController | undefined
type
inherited from ApolloEventApolloEventType
ApolloControllerConnectedEvent
Fired when a controlled element connects to the DOM
Properties
type
inherited from ApolloEventApolloEventType
type
inherited from ApolloEventApolloEventType
controller
inherited from ApolloEventApolloController | undefined
ApolloControllerDisconnectedEvent
Fired when a controlled element disconnects from the DOM
Properties
type
inherited from ApolloEventApolloEventType
type
inherited from ApolloEventApolloEventType
controller
inherited from ApolloEventApolloController | undefined
Exports
import {
ApolloEvent,
ApolloElementEvent,
ApolloControllerEvent,
ApolloControllerConnectedEvent,
ApolloControllerDisconnectedEvent
} from '@apollo-elements/core/events';