Custom Registry Script Demo
This page demonstrates a custom script registered via the scripts:registry
hook.
DevTools Integration
Open Nuxt DevTools > Scripts tab to see this custom script with its metadata and status.
Script Status
Current Status:awaitingLoad
Script Features:
- Auto-imported as
useScriptMyCustomScript
- Registered via
scripts:registry
hook - Full TypeScript support
- DevTools integration with metadata
- Schema validation in development
- Page-specific loading (only loads on this page)
DevTools Visibility:
This script only loads when you visit this page. Check the Scripts tab in Nuxt DevTools to see:
- Script appears with "My Custom Script" label
- Registry metadata shows
apiKey: demo-api-key-123
- Status transitions from "awaitingLoad" → "loading" → "loaded"
- Events are tracked as the script loads and functions are called
Demo Actions
Actions will be enabled once the script is loaded.
Implementation Details
Registry Configuration (nuxt.config.ts)
Usage in Component