Closed (fixed)
Project:
HTMX
Version:
1.2.x-dev
Component:
Drupal Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Jul 2024 at 16:16 UTC
Updated:
19 Jul 2024 at 22:54 UTC
Jump to comment: Most recent
We replicated the current core pattern by sending the asset json as an additional element to add to dom and then processing it.
Instead we can use HX-Trigger-After-Settle (see https://htmx.org/headers/hx-trigger/) to send the json and trigger it to be processed
htmx-assetManagement.js and htmx-drupalBehaviors.js based on prior feedback.HtmxResponseAttachmentsProcessor to add a HX-Trigger-After-Swap header. In the header pass the event htmxDrupalAssetsAttached along with the JSON encoded asset arrays.htmx-assetManagement.js.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
Comment #2
fathershawnComment #3
fathershawnComment #4
fathershawnComment #6
fathershawnComment #7
fathershawnComment #8
fathershawnIn addition to all check green, manual test is good. Merging
Comment #10
fathershawn