Updated mqttws31.js from http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.javascript.git/commit/?h=develop
as the previous one seems to contain bugs.