You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-09 10:22:46 +03:00
Redo build process for browsers and node. Update examples.
We now rely on browserify for building browser-specific versions of the JS SDK. This can be initiated by running 'npm run build-js'. Node versions are unaffected.
This commit is contained in:
@@ -6,6 +6,12 @@ matrixcs.request(request);
|
||||
|
||||
var client = matrixcs.createClient("http://matrix.org");
|
||||
client.publicRooms(function (err, data) {
|
||||
console.log("data %s", JSON.stringify(data));
|
||||
console.error("err %s", JSON.stringify(err));
|
||||
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>";
|
||||
});
|
||||
|
Reference in New Issue
Block a user