Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update usage paragraph of next/script onLoad #36453

Merged
merged 3 commits into from Apr 25, 2022

Conversation

lfades
Copy link
Member

@lfades lfades commented Apr 25, 2022

Changing the paragraph to not include beforeInteractive as one of the possible use cases of onLoad.

Update: Added docs for onError in the API reference of next/script.

@housseindjirdeh does onError also has the same limitation or is this only for onLoad?

Closes #33402

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • Integration tests added
  • Documentation added
  • Telemetry added. In case of a feature if it's used or not.
  • Errors have helpful link attached, see contributing.md

Documentation / Examples

  • Make sure the linting passes by running yarn lint

Copy link
Collaborator

@housseindjirdeh housseindjirdeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @lfades 🙏

Both onLoad and onError have the same limitations (they can only be used with afterInteractive and lazyOnload). Might be worthwhile to specify the same limitation for onError in this PR as well.

@lfades
Copy link
Member Author

lfades commented Apr 25, 2022

Updated the PR to include a note for both methods, and also added the docs for onError to the API reference as it was missing there.

Copy link
Member

@ijjk ijjk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kodiakhq kodiakhq bot merged commit ff140a7 into vercel:canary Apr 25, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: conflict in next/script's onLoad documentation
3 participants