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 &$variables) {
$router = \Drupal::routeMatch();
$node = $router->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.:
<html>
<head>
{% if node_object %}
{% if not node_object.field_css.isEmpty %}
<style>
{{ node_object.field_css.value|raw }}
</style>
{% endif %}
{% if not node_object.field_js.isEmpty %}
<script>
{{ node_object.field_js.value|raw }}
</script>
{% endif %}
{% endif %}
...
And yes... don't try this at home, kids ;-P