1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-05-21 08:53:44 +03:00
matrix-js-sdk/examples/browser/browserTest.js
Travis Ralston f952f6742f Remove ancient "use strict" annotations
We don't need these anymore. Theoretically this commit could go to develop, but for safety it's going to `travis/sourcemaps` first.
2019-12-17 15:43:02 -07:00

14 lines
498 B
JavaScript

console.log("Loading browser sdk");
var client = matrixcs.createClient("http://matrix.org");
client.publicRooms(function (err, data) {
if (err) {
console.error("err %s", JSON.stringify(err));
return;
}
console.log("data %s [...]", JSON.stringify(data).substring(0, 100));
console.log("Congratulations! The SDK is working on the browser!");
var result = document.getElementById("result");
result.innerHTML = "<p>The SDK appears to be working correctly.</p>";
});