Upgrade to Pro — share decks privately, control downloads, hide ads and more …

HTML5 - The 2012 of the Web - Adobe MAX

HTML5 - The 2012 of the Web - Adobe MAX

Robert Nyman

October 04, 2011
Tweet

More Decks by Robert Nyman

Other Decks in Technology

Transcript

  1. Mozilla is a global non-profit dedicated to putting you in

    control of your online experience and shaping the future of the Web for the public good
  2. <input type="color"> <input type="date"> <input type="datetime"> <input type="datetime-local"> <input type="email">

    <input type="month"> <input type="number"> <input type="range"> <input type="search" results="5" autosave="saved-searches"> <input type="tel"> <input type="time"> <input type="url"> <input type="week"> New form types
  3. <input type="text" autocomplete="off"> <input type="text" autofocus> <input type="submit" formaction="http://example.org/save" value="Save">

    <input type="submit" formenctype="application/x-www-form-urlencoded" value="Save with enctype"> <input type="submit" formmethod="POST" value="Send as POST"> <input type="submit" formnovalidate value="Don't validate"> <input type="submit" formtarget="_blank" value="Post to new tab/window"> New form attributes
  4. <input type="text" list="data-list"> <input type="range" max="95"> <input type="range" min="2"> <input

    type="file" multiple> <input type="text" readonly> <input type="text" required> <input type="text" pattern="[A-Z]*"> <input type="text" placeholder="E.g. Robocop"> <input type="text" spellcheck="true"> <input type="number" step="5">
  5. <input type="text" list="data-list"> <datalist id="data-list"> <option value="Hugo Reyes"> <option value="Jack

    Shephard"> <option value="James 'Sawyer' Ford"> <option value="John Locke"> <option value="Sayid Jarrah"> </datalist> New form elements
  6. <input type="range" id="da-range"> <output id="da-range-output"></output> <script> (function () { var

    range = document.getElementById("da-range"), output = document.getElementById("da-range-output"); range.addEventListener("input", function () { output.value = this.value; }, false); })(); </script>
  7. var anthonyWeiner = { "Interest" : "Photography", "Social" : "Twitter"

    }; localStorage.setItem("anthonyWeiner", JSON.stringify(anthonyWeiner)); console.log(typeof JSON.parse(localStorage.getItem("anthonyWeiner")));
  8. var url = "http://robertnyman.com", title = "My blog", state =

    { address : url }; window.history.pushState(state, title, url);
  9. What came before WebSockets? Cross Frame Communication HTTP Polling LiveConnect

    Forever Frame AJAX HTTP Long-Polling and XHR Streaming
  10. var ws = new WebSocket("ws://robertnyman.com/wsmagic"); // When connection is opened

    ws.onopen = function () { console.log("Connection opened!"); }; // When you receive a message ws.onmessage = function (evt) { console.log(evt.data); }; // When you close the connection ws.onclose = function () { console.log("Connection closed"); }; // When an error occurred ws.onerror = function () { console.log("An error occurred"); };