Probably worth splitting off the Coop protocol into a separate NPM module, with two main functions:
[ ] child(callback): Indicate willingness to receive information from parent, and call callback when said information arrives.
[ ] parent(subwindow, callback): If specified subwindow (and maybe an option for a wildcard) requests information, then call callback and send returned information.
The child code is currently duplicated in Cocreate (client/main.coffee) and Coauthor (client/coop.coffee). Bundling this code will make it easier for others to adopt the Coop protocol. Having a separate repo will also enable:
[ ] Document standard attributes for protocol. There are currently two: theme: dark: Boolean and user: fullName: String.
Probably worth splitting off the Coop protocol into a separate NPM module, with two main functions:
child(callback)
: Indicate willingness to receive information from parent, and callcallback
when said information arrives.parent(subwindow, callback)
: If specified subwindow (and maybe an option for a wildcard) requests information, then callcallback
and send returned information.The
child
code is currently duplicated in Cocreate (client/main.coffee
) and Coauthor (client/coop.coffee
). Bundling this code will make it easier for others to adopt the Coop protocol. Having a separate repo will also enable:theme: dark: Boolean
anduser: fullName: String
.