More work on headless setHtml