summaryrefslogtreecommitdiff
path: root/proto.js
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-06-06 16:04:40 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-06-06 16:04:40 +0200
commit9e81fcd4bdb089b8f8a05c6fbb586ec2a2a14924 (patch)
tree176d25ee9d55ca82c6d04bfe04891c3dcf8b0384 /proto.js
parent1ae51ff94d0f1f27a4e4cc657371578db13c3ca1 (diff)
Change 'observe' to 'subscribe' (and incidentally 'publish') which is more common lingo.
Diffstat (limited to 'proto.js')
-rw-r--r--proto.js27
1 files changed, 13 insertions, 14 deletions
diff --git a/proto.js b/proto.js
index 4feeceb..7c44141 100644
--- a/proto.js
+++ b/proto.js
@@ -82,14 +82,14 @@ try {
if(msgstr[c] != ' ' || instring == true) msg[idx] += msgstr[c];
}
- var observeid = msg[0];
+ var subscribeid = msg[0];
var cmd = msg[1];
var id = msg[2];
if(cmd == "remove") {
var removeEvent = new CustomEvent("removeEvent", {
detail: {
- observeid: observeid,
+ subscribeid: subscribeid,
id: id,
},
bubbles: true,
@@ -100,7 +100,7 @@ try {
else if(cmd == "move") {
var moveEvent = new CustomEvent("moveEvent", {
detail: {
- observeid: observeid,
+ subscribeid: subscribeid,
id: id,
parentid: msg[3],
},
@@ -112,7 +112,7 @@ try {
else if(cmd == "create") {
var createEvent = new CustomEvent("createEvent", {
detail: {
- observeid: observeid,
+ subscribeid: subscribeid,
id: id,
parentid: msg[3],
},
@@ -124,7 +124,7 @@ try {
else if(cmd == "update") {
var updateEvent = new CustomEvent("updateEvent", {
detail: {
- observeid: observeid,
+ subscribeid: subscribeid,
id: id,
name: msg[3],
value: msg[4],
@@ -178,14 +178,14 @@ function logout()
transmit("logout");
}
-function observe(id)
+function subscribe(id)
{
- transmit("observe "+id);
+ transmit("subscribe "+id);
}
-function unobserve(id)
+function unsubscribe(id)
{
- transmit("unobserve "+id);
+ transmit("unsubscribe "+id);
}
function create(id, parent)
@@ -193,15 +193,14 @@ function create(id, parent)
transmit("create "+id+" "+parent);
}
-
-function update(id, name, value)
+function remove(id)
{
- transmit("update "+id+" "+name+" "+value);
+ transmit("remove "+id);
}
-function remove(id)
+function update(id, name, value)
{
- transmit("remove "+id);
+ transmit("update "+id+" "+name+" "+value);
}
function move(id, parent)