From 8134c557d286f8889361a59826568a31c72f4a3f Mon Sep 17 00:00:00 2001 From: Malte Ubl Date: Sun, 24 May 2020 09:48:15 -0700 Subject: [PATCH] Bring example in line with simplified namespace --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bd3ddcd..c22a8e1 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ This requires the use of a broker that supports WebSockets natively, or the use ```JS // Create a client instance -var client = new Paho.MQTT.Client(location.hostname, Number(location.port), "clientId"); +var client = new Paho.Client(location.hostname, Number(location.port), "clientId"); // set callback handlers client.onConnectionLost = onConnectionLost; @@ -90,7 +90,7 @@ function onConnect() { // Once a connection has been made, make a subscription and send a message. console.log("onConnect"); client.subscribe("World"); - message = new Paho.MQTT.Message("Hello"); + message = new Paho.Message("Hello"); message.destinationName = "World"; client.send(message); }