Files
divkit/client/web/divkit-examples/globals/index.html
T
2022-08-26 03:52:29 +03:00

44 lines
1.2 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="node_modules/@divkitframework/divkit/dist/client.css">
</head>
<body>
<div id="root"></div>
<script src="node_modules/@divkitframework/divkit/dist/browser/client.js"></script>
<script>
Ya.Divkit.render({
id: 'test',
target: document.querySelector('#root'),
json: {
"templates": {
"wrap_content_text": {
"type": "text",
"width": {"type": "wrap_content"}
}
},
"card": {
"log_id": "snapshot_test_card",
"states": [
{
"state_id": 0,
"div": {
"type": "wrap_content_text",
"text": "Hello divkit"
}
}
]
}
}
});
</script>
</body>
</html>