<form method="dialog">
<p>
<label>Your name:
- <input id="name" type="text">
+ <input id="name" type="text" autocomplete="off">
</label>
</p>
<div>
- <button value="cancel">Cancel</button>
- <button id="confirm" value="default">Confirm</button>
+ <button value="default">OK</button>
</div>
</form>
</dialog>
<div id="images">
</div>
- <ul id="comments">
- </ul>
+ <dl id="comments">
+ </dl>
<p>
<form action="" id="comment-form">
}
});
- socket.on('comment', function(msg) {
- var item = document.createElement('li');
- item.textContent = msg;
- comments.appendChild(item);
+ socket.on('comment', function(comment) {
+ const dt = document.createElement('dt');
+ const dd = document.createElement('dd');
+ dt.textContent = comment.name;
+ dd.textContent = comment.text;
+ comments.appendChild(dt);
+ comments.appendChild(dd);
});
socket.on('inform-name', (name) => {