HTML and CSS Reference
In-Depth Information
//chat box
context
.
strokeStyle
=
'#000000'
;
context
.
strokeRect
(
10
,
10
,
335
,
285
);
starti
=
0
;
lastMessage
=
chatMessages
.
length
-
1
;
iif
(
chatMessages
.
length
>
maxMessages
) {
starti
=
(
chatMessages
.
length
)
-
maxMessages
;
}
starty
=
15
;
for
for
(
var
var
i
=
starti
;
i
<
chatMessages
.
length
;
i
++
) {
context
.
fillText
(
chatMessages
[
i
],
10
,
starty
);
starty
+=
12
;
}
}
That's it! We've finished developing our multiuser chat application.