diff --git a/docs/api-reference/next/script.md b/docs/api-reference/next/script.md index 7ef25eca3c3e..c1470361fcc1 100644 --- a/docs/api-reference/next/script.md +++ b/docs/api-reference/next/script.md @@ -73,3 +73,29 @@ export default function Home() { ) } ``` + +### onError + +A method that executes if the script fails to load. + +> **Note: `onError` can't be used with the `beforeInteractive` loading strategy.** + +The following is an example of how to use the `onError` property: + +```jsx +import Script from 'next/script' + +export default function Home() { + return ( + <> +