Mark
This feature allows you to mark specific elements.
INFO
For more technical documentation, see the relevant documentation under the API-section.
Usage
In the HTML
In your component examples, use the following attribute.
html
<div data-speccer="mark" …>…</div>
Programmatically
typescript
import { mark } from 'https://esm.sh/@phun-ky/speccer';
import type {
SpeccerOptionsInterface,
SpeccerPositionType
} from 'https://esm.sh/@phun-ky/speccer';
const { create } = mark as {
create: (target: HTMLElement, options?: SpeccerOptionsInterface) => void;
};
const element = document.querySelector('…');
const options = {
slug: 'markTest',
type: 'mark'
};
await create(element, options);