Issue #3294720 by abramm: The attachBehaviors() for document is only called after Big Pipe chunks are processed

merge-requests/2501/head
catch 2022-07-11 23:41:11 +09:00
parent bfeff83776
commit 798800c653
2 changed files with 8 additions and 0 deletions

View File

@ -93,6 +93,11 @@
return false;
}
// Attach Drupal behaviors early, if possible.
once('big-pipe-early-behaviors', 'body', context).forEach((el) => {
Drupal.attachBehaviors(el);
});
once(
'big-pipe',
'script[data-big-pipe-replacement-for-placeholder-with-id]',

View File

@ -47,6 +47,9 @@
return false;
}
once('big-pipe-early-behaviors', 'body', context).forEach(el => {
Drupal.attachBehaviors(el);
});
once('big-pipe', 'script[data-big-pipe-replacement-for-placeholder-with-id]', context).forEach(bigPipeProcessPlaceholderReplacement);
if (context.querySelector('script[data-big-pipe-event="stop"]')) {