Skip to content

Add ability to control AJAX with HTML attributes #6937

@herbdool

Description

@herbdool

Description of the need

From a discussion about HTMX: #Backdrop > HTMX @ 💬, Nate makes a good suggestion:

What I think we could do, if controlling AJAX with markup was the appealing aspect... is make ajax.js read from data- attributes in addition to reading from Backdrop.settings. It would actually be my preference to reduce usage of Backdrop.settings as much as possible and have it read from the HTML responses instead. That would make attaching the behaviors and avoid conflicts with multiple responses overwriting Backdrop.settings repeatedly.

Nate was not keen about adopting HTMX. Drupal has added HTMX as a dependency but backwards-compatibility would be difficult or impossible. Everything would need to be reworked.

Proposed solution

TBD

Alternatives that have been considered

Introduce HTMX like https://www.drupal.org/project/drupal/issues/3520723

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions