Add inline styles/JS from fields to
You could do this with a preprocess function. The code here works for full views only (it won't work e.g. in a view of multiple teaser nodes).

function THEME_preprocess_html(array &amp;$variables) {
  $router = \Drupal::routeMatch();
  $node = $router-&gt;getParameter('node');
  if (is_numeric($node)) {
    $node = \Drupal\node\Entity\Node::load($node);
  }
  if ($node instanceof \Drupal\node\NodeInterface) {
    $variables['node_object'] = $node;
  }
}


Now you can use {{ node_object }} in your html.twig.twig, e.g.:

&lt;html&gt;
&lt;head&gt;
  {% if node_object %}
    {% if not node_object.field_css.isEmpty %}
      &lt;style&gt;
        {{ node_object.field_css.value|raw }}
      &lt;/style&gt;
    {% endif %}
    {% if not node_object.field_js.isEmpty %}
      &lt;script&gt;
        {{ node_object.field_js.value|raw }}
      &lt;/script&gt;
    {% endif %}
  {% endif %}
  ...


And yes... don't try this at home kids ;-P