<1 min read
DisplayEmitter
DisplayEmitter
A component that emits a display event when it first appears in the viewport.
Props
Name | Description | Type | Default |
---|---|---|---|
payload | The payload for the display event emit. | TaggingRequest |
|
eventMetadata | Optional event metadata. | Omit<WireMetadata, 'moduleName' | 'origin' | 'location'> |
|
Slots
Name | Description | Bindings (name - type - description) |
---|---|---|
default | None |
Events
This component emits the following events:
See it in action
In this example, the DisplayEmitter
component will emit the TrackableElementDisplayed
event when
the div inside first appears in the viewport.
<template>
<DisplayEmitter :payload="{ url: 'tagging/url', params: {} }">
<div>I'm displaying</div>
</DisplayEmitter>
</template>
<script>
import { DisplayEmitter } from '@empathyco/x-components';
export default {
name: 'DisplayEmitterDemo',
components: {
DisplayEmitter
}
};
</script>