IE conditional comments for HTML class?
Your best bet is to print the class attributes separately, and use the without twig filter, then hard code the IE stuff, e.g.

&lt;!--[if lt IE 9]&gt; &lt;html{{ html_attributes|without('class') }} class="{{ html_attributes.class }} lt-ie10 lt-ie9"&gt; &lt;![endif]--&gt;
&lt;!--[if IE 9]&gt;    &lt;html{{ html_attributes|without('class') }} class="{{ html_attributes.class }} lt-ie10"&gt; &lt;![endif]--&gt;
&lt;!--[if gt IE 9]&gt;&lt;!--&gt;
&lt;html{{ html_attributes.addClass('no-js') }}&gt;
&lt;!--&lt;![endif]--&gt;



https://www.drupal.org/node/1823416
https://www.drupal.org/docs/8/theming/twig/filters-modifying-variables-in-twig-templates