Problem/Motivation

We need a new “header” option in the SPA library plugin configuration that allows external JavaScript libraries to be optionally loaded in the document header instead of the footer. This provides more flexibility in cases where scripts need to be loaded early.

Issue fork spa-3557794

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

valegole created an issue. See original summary.

valegole’s picture

Title: Add "Header" Option to JsExternal SPA Library Plugin » Add ability to set unlimited and arbitrary attributes on external script tags

We also need the ability to attach an external script with any number of custom attributes. Currently, the implementation only supports a predefined or limited set of attributes. For our use case, external scripts must be configurable with arbitrary attributes (e.g., data-*, custom flags, or integration-specific parameters).

valegole’s picture

Title: Add ability to set unlimited and arbitrary attributes on external script tags » Add "Header" Option to JsExternal SPA Library Plugin and add ability to set unlimited and arbitrary attributes on external script tags
valegole’s picture

Status: Active » Needs review
harlor’s picture

Assigned: valegole » harlor

We should move these new options to the base class.

harlor’s picture

Status: Needs review » Needs work
hydra’s picture

Status: Needs work » Reviewed & tested by the community
harlor’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.