Skip to content

Commit 013e2bf

Browse files
Copilothumitos
andcommitted
Improve clarity in CustomScript documentation
Co-authored-by: humitos <244656+humitos@users.noreply.github.com>
1 parent 9ed281a commit 013e2bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/user/addons.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,8 @@ Common use cases for custom scripts include:
415415
Accessing Addons data from your script
416416
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
417417

418-
Custom scripts are loaded after the ``readthedocs-addons-data-ready`` event has been fired.
418+
Custom scripts are loaded asynchronously after the initial page load,
419+
which means the ``readthedocs-addons-data-ready`` event has already been fired by the time your script executes.
419420
To access the Addons data from your custom script,
420421
check the ``window.ReadTheDocsEventData`` object first,
421422
then subscribe to the event for future updates (for example, when the URL changes in a single-page application):

0 commit comments

Comments
 (0)