protected function sendNoJsPlaceholders($html,
$no_js_placeholders, AttachedAssetsInterface
$cumulative_assets) { // Split the HTML on every no-JS placeholder string.
$placeholder_strings =
array_keys($no_js_placeholders);
$fragments =
static::
splitHtmlOnPlaceholders($html,
$placeholder_strings);
// Determine how many occurrences there are of each no-JS placeholder.
$placeholder_occurrences =
array_count_values(array_intersect($fragments,
$placeholder_strings));
// Set up a variable to store the content of placeholders that have multiple
// occurrences.
$multi_occurrence_placeholders_content =
[];
foreach ($fragments as $fragment) { // If the fragment isn't one of the no-JS placeholders, it is the HTML in
// between placeholders and it must be printed & flushed immediately. The