"> -->
jc(msto)
set values
msto.key = "value"
msto.example = {
str:"these are supported data types",
number:12.7,
arr:["val0",1,{z:1},["a","b"]],
obj:{d:"there is a max depth of 15"},
str2:"null isn't fully supported yet and can break things",
}
you can paste this shorter statement to avoid newlines in your devtools history :)
msto.example = {str:"str_val",number:12.7,arr:["val0",1,{z:2},["a","b"]],obj:{d:"depth of 2?"},str2:"yet another string",}
get values
msto.example.arr[0]
// "val0"
msto.example.arr[2]
// {z:2}
the datastructure should have syncronized msto & msto_prx on both webpages
values can be strings,numbers,objects or arrays
null and undefined are not supported yet
local changes are immediate
and deletes are local only (for now)
after a value is set is pushed to everyone else who is connected
msto.ws_channels and msto.participants are write protected
msto.my_data links to the path you have write access to as does msto.my_channel
participants and channels write only data are automatically deleted after they leave
the data is not persistent it exists in the webpages of those connected
if everyone leaves a room the datastructure is destroyed