Checking...
The widget is configured with data-preview-param="preview-agent".
This means the widget will only load when the URL contains
?preview-agent=true.
<script
src="https://cdn.jsdelivr.net/npm/@runtypelabs/persona@latest/dist/install.global.js"
data-runtype-token="YOUR_TOKEN"
data-preview-param="preview-agent"
></script>
import { initAgentWidget } from '@runtypelabs/persona';
const widget = initAgentWidget({
target: 'body',
previewQueryParam: 'preview-agent',
config: {
clientToken: 'YOUR_TOKEN'
}
});
// widget will be null if preview param is missing
if (widget) {
console.log('Widget initialized!');
}