From f4b421cf8f1ca975c94c89f3805afc97ec97bc72 Mon Sep 17 00:00:00 2001 From: You Kinjoh Date: Thu, 19 Jan 2023 23:17:50 +0000 Subject: [PATCH] debug `EXAMPLE 7` (#511) SHA: e20eb63e72de6949bcfe5198b66aa1a847bf2afa Reason: push, by mfoltzgoogle Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 7096aa3..11a25d6 100644 --- a/index.html +++ b/index.html @@ -1048,10 +1048,10 @@

Presentation API

Example 7
<!-- controller.html -->
 <script>
-  connection.send("{string: '你好,世界!', lang: 'zh-CN'}");
-  connection.send("{string: 'こんにちは、世界!', lang: 'ja'}");
-  connection.send("{string: '안녕하세요, 세계!', lang: 'ko'}");
-  connection.send("{string: 'Hello, world!', lang: 'en-US'}");
+  connection.send('{"string": "你好,世界!", "lang": "zh-CN"}');
+  connection.send('{"string": "こんにちは、世界!", "lang": "ja"}');
+  connection.send('{"string": "안녕하세요, 세계!", "lang": "ko"}');
+  connection.send('{"string": "Hello, world!", "lang": "en-US"}');
 </script>
 
 <!-- presentation.html -->
@@ -1061,7 +1061,7 @@ 

Presentation API

var spanElt = document.createElement("SPAN"); spanElt.lang = messageObj.lang; spanElt.textContent = messageObj.string; - document.appendChild(spanElt); + document.body.appendChild(spanElt); }; </script>