Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>In HTML 5 is there any support for things which are really easy to do in Silverlight?</p> </blockquote> <p><a href="https://meta.stackoverflow.com/search?q=subjective+and+argumentative">See this</a></p> <blockquote> <p>For example, ripping a file (chosen by the user) into an array of bytes</p> </blockquote> <p>Yes. <a href="https://developer.mozilla.org/en/DOM/FileReader" rel="nofollow noreferrer">See this</a></p> <blockquote> <p>that can be base64 encoded </p> </blockquote> <p><a href="http://www.google.com/search?aq=f&amp;sourceid=chrome&amp;ie=UTF-8&amp;q=javascript+base64+encoding" rel="nofollow noreferrer">Google</a></p> <blockquote> <p>and passed up to a web service?</p> </blockquote> <p><a href="http://www.w3.org/TR/XMLHttpRequest/" rel="nofollow noreferrer">XMLHttpRequest</a> still works.</p> <blockquote> <p>Or, creation/reading of an image and being able to manipulate the pixels and display this on screen? </p> </blockquote> <p>Yes. Combine <code>FileReader</code> with <a href="https://developer.mozilla.org/en/Canvas_tutorial/Using_images" rel="nofollow noreferrer">canvas</a>.</p> <blockquote> <p>Or even save it to disk (location chosen by the user)?</p> </blockquote> <p><strike>Sorry, not possible.</strike> No longer the case! See <a href="https://stackoverflow.com/a/4551467/1276410">this.</a></p> <blockquote> <p>If so, which browsers would support this</p> </blockquote> <p>I know Firefox does, but <a href="http://www.html5rocks.com/tutorials/file/dndfiles/#toc-reading-files" rel="nofollow noreferrer">try this</a> on other browsers. See what works and what doesn't.</p> <blockquote> <p>and are the APIs consistent?</p> </blockquote> <p>Yes. These are called <a href="http://dev.w3.org/html5/spec/Overview.html" rel="nofollow noreferrer">standards</a> for a reason.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload