Add defer attribute

Created on 22 October 2025, 12 days ago

Problem/Motivation

The Open ReadSpeaker module injects its JavaScript without the defer attribute.

Even though the script is added near the bottom of the page, it can still block parsing and delay other scripts.
Adding defer allows the script to load and execute after HTML parsing, improving performance and avoiding interference with chunked or framework-based JavaScript (e.g. React/Vue/Web Components).

Steps to reproduce

- Inspect page source — the ReadSpeaker <script> tag lacks defer.
- Note potential render-blocking behaviour in performance tools.

Proposed resolution

Add the defer attribute to the ReadSpeaker script tag via open_readspeaker_library_info_build().

Remaining tasks

- Update open_readspeaker_library_info_build()

User interface changes

None

API changes

None

Data model changes

None

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇦🇺Australia almunnings Melbourne, 🇦🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Merge request !41Add defer → (Open) created by almunnings
  • Pipeline finished with Success
    12 days ago
    Total: 138s
    #636675
Production build 0.71.5 2024