This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (websocket.bufferedAmount < bufferThreshold) { | |
websocket.send(message); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onMessage(evt) { | |
writeToScreen( evt.data ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onMessage(evt) { | |
if (evt.data instanceof Blob) { | |
// do something with evt.data | |
} else { | |
document.getElementById("textresponse").value = evt.data; | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onClose(evt) { | |
writeToScreen("DISCONNECTED"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="email" id="orderEmail" name="myEmail" placeholder="email@contoso.com" required /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label for="price">Price</label> | |
<input id="price" type="text" title="0.00" pattern="\d+(\.\d{2})?" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="range" name="anumberbetween1and10" min="1" max="10" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type= "text" list= "pacificstates" name= "State" id= "State" placeholder= "Pick a State" /> | |
<datalist id= "pacificstates"> | |
<select> | |
<option value= "California" /> | |
<option value= "Oregon" /> | |
<option value= "Washington" /> | |
</select> | |
</datalist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label for= "zip">ZIP Code: </label><input type= "text" id= "zip" title="Five- or nine-digit zip code" | |
pattern="^(\d{5}-\d{4}|\d{5}|\d{9})$" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
input:required:invalid, input:focus:invalid | |
{ | |
background-image: url(/images/invalid.png); | |
background-position: right top; | |
background-repeat: no-repeat; | |
} | |
</style> |