This file contains hidden or 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
socket.onmessage = function(event) { if (event.data instanceof Blob) { // 1. Get the raw data. var blob = event.data; // 2. Create a new URL for the blob object. window.URL = window.URL || window.webkitURL; var source = window.URL.createObjectURL(blob); // 3. Create an image tag programmatically. var image = document.createElement("img"); image.src = source; image.alt = "Image generated from blob"; // 4. Insert the new image at the end of the document. document.body.appendChild(image); } |
This file contains hidden or 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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
NewerOlder