web app data callback test
This commit is contained in:
parent
a2f2815b6a
commit
5462214fbb
1 changed files with 21 additions and 0 deletions
21
web/web_callback_test/index.html
Normal file
21
web/web_callback_test/index.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<script src="../common/telegram.js"></script>
|
||||
</head>
|
||||
<body style="filter: invert(1)">
|
||||
<h1>/web_callback_test</h1>
|
||||
<textarea id="data" style="width: 100%; height: 200px"></textarea>
|
||||
<button style="font-size: 20px;" onclick="sendData()">Send Data</button>
|
||||
<script>
|
||||
const tg = window.Telegram.WebApp
|
||||
const sendData = () => {
|
||||
tg.sendData(document.getElementById('data').value)
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Reference in a new issue