How to append attributes to <body> in server-render?


#1

We can use WebApp.addHtmlAttributeHook to add attributes to the html tag - how do we do the same for the body tag on the server?

onPageLoad(sink => {
  const helmet = Helmet.renderStatic()
  sink.appendToHead(helmet.meta.toString())
  sink.appendToHead(helmet.title.toString())
  sink.appendToHead(helmet.link.toString())

  WebApp.addHtmlAttributeHook(() => (
    Object.assign({
      lang: 'en'
    }, helmet.htmlAttributes.toComponent())
  ))
  // Also add attributes to body ??
  ...

#2

Anyone? Maybe there isn’t a way to do it?