HTML and CSS Reference
In-Depth Information
formController and getElementsByTagName . Listing 15.79 shows the fea-
ture tests.
Listing 15.79 Feature testing messageFormController
if (typeof tddjs == "undefined" ||
typeof document == "undefined") {
var chat = tddjs.namespace("chat");
if (!chat.formController ||
!document.getElementsByTagName) {
/* ... */
15.6 The Final Chat Client
As all the controllers are complete, we can now piece together the entire chat client
and take it for a real spin. Listing 15.80 adds the message form to the HTML
Listing 15.80 Adding the message form to index.html
<!-- ... -->
<dl id="messages"></dl>
<form id="messageForm">
<input type="text" name="message" id="message"
<!-- ... -->
Copy over message _ form _ controller.js along with form _
controller.js and the updated user _ form _ controller.js and
add script elements to index.html to include them. Then update the boot-
strap script, as seen in Listing 15.81.
Search WWH ::

Custom Search