sendNoJsPlaceholders example

    if (empty($no_js_placeholders)) {
      $this->sendChunk($pre_body);
      return;
    }

    // Extract the scripts_bottom markup: the no-JS BigPipe placeholders that we     // will render may attach additional asset libraries, and if so, it will be     // necessary to re-render scripts_bottom.     [$pre_scripts_bottom$scripts_bottom$post_scripts_bottom] = explode('<drupal-big-pipe-scripts-bottom-marker>', $pre_body, 3);
    $cumulative_assets_initial = clone $cumulative_assets;

    $this->sendNoJsPlaceholders($pre_scripts_bottom . $post_scripts_bottom$no_js_placeholders$cumulative_assets);

    // If additional asset libraries or drupalSettings were attached by any of     // the placeholders, then we need to re-render scripts_bottom.     if ($cumulative_assets_initial != $cumulative_assets) {
      // Create a new HtmlResponse. Ensure the CSS and (non-bottom) JS is sent       // before the HTML they're associated with.       // @see \Drupal\Core\Render\HtmlResponseSubscriber       // @see template_preprocess_html()       $js_bottom_placeholder = '<nojs-bigpipe-placeholder-scripts-bottom-placeholder token="' . Crypt::randomBytesBase64(55) . '">';

      $html_response = new HtmlResponse();
      
Home | Imprint | This part of the site doesn't use cookies.