How does content preview works?

How does the content preview works? I cannot find any documentation refering to this feature.

EDIT: I just found out this: https://github.com/agentejo/cockpit/issues/782
And it worked for me, but would like to know more about it, specially the websockets version of it.