Custom Plugin
This section introduces how to develop a custom plugin to provide additional functionality for the Replay SDK.
Custom Matcher
import { ExtensionType } from '@/models/Extension/Type';
import Extension from '@/packages/core/Extension';
const ImeanInput = Extension.create({
name: 'ImeanInput',
version: '0.0.1',
description: 'Find the Input element with ID imean',
type: ExtensionType.Matcher,
scenario: 'All',
getDefaultOptions: undefined,
priorityMatch: ['ImeanInputMatch'],
async addMatchRules(manager, options) {
const step = await manager.getActionStep();
if (!step) return undefined;
return document.querySelector<HTMLElement>('#imean') || undefined;
},
async addMatchBeforeRules() {
return undefined;
}
});
export default Selector;Custom Trigger
Last updated