I cannot find documentation for #addHtmlAttributeHook anywhere, including at the WebApp documentation here: WebApp | Docs. Can anyone point me to the docs or can the docs be updated? Thanks!
I think this isn’t formally documented, it’s only mentioned in passing in the SSR example on the WebApp docs page. The best reference is the source itself:
WebApp.addHtmlAttributeHook(hook) registers a function that runs on every request. It receives a categorized request object and returns null or a plain object, and the returned attributes get applied to the <html> tag.
A common use is setting lang, which I did in a template I created a few years ago: