Update WebAssembly section in build.html.

GitOrigin-RevId: 2fec19ab7de21cccc7c34fb9fd83aeaadf9de1f0
This commit is contained in:
levlam 2019-04-25 18:56:01 +03:00
parent 7105ad5a06
commit d280e6a5cc
2 changed files with 7 additions and 6 deletions

View File

@ -161,7 +161,7 @@ function getSupportedOs(language) {
case 'Choose a programming language:': case 'Choose a programming language:':
return []; return [];
case 'JavaScript': case 'JavaScript':
return ['Windows (Node.js)', 'Linux (Node.js)', 'macOS (Node.js)', 'FreeBSD (Node.js)', 'Browser (Chrome, Firefox, Safari, Edge, Opera)']; return ['Windows (Node.js)', 'Linux (Node.js)', 'macOS (Node.js)', 'FreeBSD (Node.js)', 'Browser'];
case 'Java': case 'Java':
return ['Windows', 'Linux', 'macOS', 'FreeBSD', 'Android']; return ['Windows', 'Linux', 'macOS', 'FreeBSD', 'Android'];
case 'C#': case 'C#':
@ -189,7 +189,7 @@ function getExampleAnchor(language) {
case 'Ruby': case 'Ruby':
case 'D': case 'D':
case 'Elixir': case 'Elixir':
case 'Ñ': case 'C':
return language.toLowerCase(); return language.toLowerCase();
case 'C#': case 'C#':
return 'csharp'; return 'csharp';
@ -301,11 +301,12 @@ function onOsChanged() {
if (language === 'Other') { if (language === 'Other') {
language = 'any other programming language'; language = 'any other programming language';
} }
var text = 'TDLib can be used from ' + language + ' on ' + os + ' through the ' + getTargetName(target) + ' interface.<BR>' + var text = 'TDLib can be used from ' + language + ' on ' + os + ' through the ' + getTargetName(target) + ' interface.<br>' +
'See <a href="https://github.com/tdlib/td/blob/master/example/README.md#' + getExampleAnchor(language) + '">examples</a> of such usage and already available third-party frameworks.<BR>'; 'See <a href="https://github.com/tdlib/td/blob/master/example/README.md#' + getExampleAnchor(language) + '">examples</a> of such usage and already available third-party frameworks.<br>';
if (target === 'WebAssembly') { if (target === 'WebAssembly') {
text = 'Complete instruction for TDLib building for browsers will be published soon.'; text = 'TDLib is available in a prebuilt form as an <a href="https://www.npmjs.com/">NPM</a> package <a href="https://www.npmjs.com/package/@arseny30/tdweb">tdweb</a>.<br>' +
'If you want to build it manually, take a look at our <a href="https://github.com/tdlib/td/blob/master/example/web/">example</a>';
target = ''; target = '';
} }
if (target === 'Android') { if (target === 'Android') {

View File

@ -1,7 +1,7 @@
# TDLib Web example # TDLib Web example
This is an example of building `TDLib` for browsers using [Emscripten](https://github.com/kripken/emscripten). This is an example of building `TDLib` for browsers using [Emscripten](https://github.com/kripken/emscripten).
These scripts build `TDLib` and creates [NPM](https://www.npmjs.com/) package [tdweb](https://www.npmjs.com/package/@arseny30/tdweb). These scripts build `TDLib` and creates an [NPM](https://www.npmjs.com/) package [tdweb](https://www.npmjs.com/package/@arseny30/tdweb).
You need Unix shell with `sed`, `tar` and `wget` utilities to run provided scripts. You need Unix shell with `sed`, `tar` and `wget` utilities to run provided scripts.
## Building tdweb NPM package ## Building tdweb NPM package