diff --git a/js/links.js b/js/links.js index b39f8e0..9dd5eb4 100644 --- a/js/links.js +++ b/js/links.js @@ -9,21 +9,21 @@ window.addEventListener("load", () => { h("li", {}, h("a", {href: "chrome://crash"}, "chrome://crash")), ); - let btn1 = h("button", {}, "notify (via info message) with deep-link to internal page"); + let btn1 = h("button", {}, "info with deep-link to internal page, no notify"); btn1.onclick = () => { - window.webxdc.sendUpdate({ payload: "", info: "click me to open ./page.html directly", href: "./page.html", notify:["all", window.webxdc.selfAddr]}, ""); + window.webxdc.sendUpdate({ payload: "", info: "open page.html", href: "page.html" }, ""); }; ul.append(h("li", {}, btn1)); - let btn2 = h("button", {}, "notify (via summary) with deep-link to internal page"); + let btn2 = h("button", {}, "info and notify all with deep-link to internal page"); btn2.onclick = () => { - window.webxdc.sendUpdate({ payload: "", info: "click me to open ./page.html directly", href: "./page.html", notify:["all", window.webxdc.selfAddr]}, ""); + window.webxdc.sendUpdate({ payload: "", info: "open page.html", href: "page.html", notify: {"*": "notify page.html"} }, ""); }; ul.append(h("li", {}, btn2)); - let btn3 = h("button", {}, "send info message with deep-link to #links-output section"); + let btn3 = h("button", {}, "info and notify all with deep-link to #links-output section"); btn3.onclick = () => { - window.webxdc.sendUpdate({ payload: "", info: "click me to open #links-output directly", href: "#links-output"}, ""); + window.webxdc.sendUpdate({ payload: "", info: "open #links-output", href: "index.html#links-output", notify: {"*": "notify #links-output"} }, ""); }; ul.append(h("li", {}, btn3));