SlideShare une entreprise Scribd logo
1  sur  26
NovikovEugeny 29.10.10 HTML5 review
Rough Timeline of Web Technologies 1991   HTML 1994   HTML 2 1996   CSS1 + JavaScript 1997   HTML 4 1998   CSS 2 2000   XHTML 1 2002   Tableless Web Design 2005   AJAX 2009   HTML 5
What is HTML5 ? HTML5 ~=HTML + CSS + JS APIs
New simple doctype <!DOCTYPE html>
New semantic tags <body> <header>     <hgroup>       <h1>Page title</h1>       <h2>Page subtitle</h2>     </hgroup>    </header>  <nav>      <ul> Navigation... </ul>   </nav>    <section>     <article>        <header>          <h1>Title</h1>        </header>        <section>          Content...        </section>      </article>      <article>       <header>        <h1>Title</h1>       </header>       <section>           Content...      </section>    </article>    <article>       <header>         <h1>Title</h1>       </header>       <section>           Content...       </section>    </article> </section> <aside>       Top links...  </aside> <footer>      Copyright © 2010.    </footer>  </body>
Div vs New tags
New link relations <link rel="alternate" type="application/rss+xml" href="http://myblog.com/feed" />  <link rel="icon" href="/favicon.ico" />  <link rel="pingback" href="http://myblog.com/xmlrpc.php">  <link rel="prefetch"href="http://myblog.com/main.php">  ... <a rel="archives" href="http://myblog.com/archives">old posts</a>  <a rel="external" href="http://notmysite.com">tutorial</a>  <a rel="license" href="http://www.apache.org/licenses/LICENSE-2.0">license</a>  <a rel="nofollow" href="http://notmysite.com/sample">wannabe</a>  <a rel="tag" href="http://myblog.com/category/games">games posts</a> http://www.blog.whatwg.org/the-road-to-html-5-link-relations#what
ARIA attributes <ul id="tree1"  role="tree"  tabindex="0« aria-labelledby="label_1"> <lirole="treeitem" tabindex="-1" aria-expanded="true">Fruits</li>  <lirole="group">  <ul>  <lirole="treeitem" tabindex="-1">Oranges</li>  <lirole="treeitem" tabindex="-1">Pineapples</li> ...  </ul>  </li>  </ul>
New form field types
Audio + Video <audio id="audio" src="djtapolskii.mp3" controls></audio>; <video id="video" src="10 минут для пресса.avi" autoplay controls></video>
Canvas <canvas id="canvas" width="838" height="220"></canvas>  <script> varcanvasContext = document.getElementById("canvas").getContext("2d"); canvasContext.fillRect(250, 25, 150, 100); canvasContext.beginPath(); 	canvasContext.arc(450, 110, 100, Math.PI * 1/2, Math.PI * 3/2);  canvasContext.lineWidth = 15;  canvasContext.lineCap = 'round';  canvasContext.strokeStyle = 'rgba(255, 127, 0, 0.5)';  canvasContext.stroke();  </script>
New in HTML ,[object Object]
Accessibility (ARIA roles)
Web Forms 2.0 (Input Fields)
Multimedia (Audio Tag, Video Tag)
2D drawing (Canvas),[object Object]
New Selectors Finding elements by class (DOM API) var el = document.getElementById('section1');  el.focus();  varels = document.getElementsByTagName('div'); els[0].focus(); varels = document.getElementsByClassName('section');  els[0].focus(); Finding elements by CSS syntax (Selectors API) varels = document.querySelectorAll("ulli:nth-child(odd)"); varels = document.querySelectorAll("table.test > tr > td");
Web Storage // use localStorage for persistent storage  // use sessionStorage for per tab storage  textarea.addEventListener('keyup', function () {  window.localStorage['value'] = area.value;  window.localStorage['timestamp'] = (new Date()).getTime();  }, false);  textarea.value = window.localStorage['value'];                                                   Save text value on the client side
Web SQL Database Var db = window.openDatabase(“Database Name”, “Database Version”); db.transaction(function(tx) { tx.executeSql(“SELECT * FROM test”, [], successCallback, errorCallback); }); If you try to open a database that doesn’t exist, the API will create it on the fly for you. You also don’t have to worry about closing databases.  http://html5doctor.com/introducing-web-sql-databases/
Application Cache <html manifest = “cache.manifest”> Window.applicationCache.addEventListener( ‘checking’ , updateCacheStatus, false); CACHE MANIFEST # version 1 CACHE: /html5/src/refresh.png /html5/src/logic.js /html5/src/style.css /html5/src/background.png
Web Workers main.js:  var worker = new Worker('extra_work.js'); worker.onmessage = function(event) { alert(event.data);  }; extra_work.js:  self.onmessage= function(event) {  		// Do some work.  self.postMessage(some_data); 	}
Web Sockets var socket = new WebSocket(location);  socket.onopen = function(event) { socket.postMessage(“Hello, WebSocket”);  }  socket.onmessage = function(event) { alert(event.data); }  socket.onclose = function(event) { alert(“closed”); }  Bi-directional, full-duplex communications channels, over a single Transmission  Control Protocol (TCP) socket, designed to be implemented in webbrowsers  and web servers.
Notifications if (window.webkitNotifications.checkPermission() == 0) {  // you can pass any url as a parameter  window.webkitNotifications.createNotification(tweet.picture, tweet.title, tweet.text).show();  } else { window.webkitNotifications.requestPermission(); }  http://playground.html5rocks.com/#simple_notifications
Drag and drop document.addEventListener('dragstart', function(event) { event.dataTransfer.setData('text', 'Customized text'); event.dataTransfer.effectAllowed= 'copy';  }, false); http://playground.html5rocks.com/#drag_from_desktop
Geolocation if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) {  var lat = position.coords.latitude;  varlng = position.coords.longitude;  var options = { position: new google.maps.LatLng(lat, lng) }  var marker = new google.maps.Marker(options);  marker.setMap(map);  	}); }
New in JS APIs ,[object Object]

Contenu connexe

Tendances

Challenges of building a search engine like web rendering service
Challenges of building a search engine like web rendering serviceChallenges of building a search engine like web rendering service
Challenges of building a search engine like web rendering serviceGiacomo Zecchini
 
Web Performance & Search Engines - A look beyond rankings
Web Performance & Search Engines - A look beyond rankingsWeb Performance & Search Engines - A look beyond rankings
Web Performance & Search Engines - A look beyond rankingsGiacomo Zecchini
 
Microformats HTML to API
Microformats HTML to APIMicroformats HTML to API
Microformats HTML to APIelliando dias
 
#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]Dalibor Gogic
 
Developing PHP Web Applications with the Raxan Framework
Developing PHP Web Applications with the Raxan FrameworkDeveloping PHP Web Applications with the Raxan Framework
Developing PHP Web Applications with the Raxan FrameworkRaymond Irving
 
Intro to html5 Boilerplate
Intro to html5 BoilerplateIntro to html5 Boilerplate
Intro to html5 BoilerplateMichael Enslow
 
Findability Bliss Through Web Standards
Findability Bliss Through Web StandardsFindability Bliss Through Web Standards
Findability Bliss Through Web StandardsAarron Walter
 
Web Standards: Fueling Innovation [Web Design World Boston '08]
Web Standards: Fueling Innovation [Web Design World Boston '08]Web Standards: Fueling Innovation [Web Design World Boston '08]
Web Standards: Fueling Innovation [Web Design World Boston '08]Aaron Gustafson
 
Everything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick Stox
Everything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick StoxEverything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick Stox
Everything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick Stoxpatrickstox
 
REST, the internet as a database?
REST, the internet as a database?REST, the internet as a database?
REST, the internet as a database?Andrej Koelewijn
 
Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010Matthew Mobbs
 
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick StoxSMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stoxpatrickstox
 
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>tutorialsruby
 

Tendances (20)

Challenges of building a search engine like web rendering service
Challenges of building a search engine like web rendering serviceChallenges of building a search engine like web rendering service
Challenges of building a search engine like web rendering service
 
Introducing YUI
Introducing YUIIntroducing YUI
Introducing YUI
 
Web Performance & Search Engines - A look beyond rankings
Web Performance & Search Engines - A look beyond rankingsWeb Performance & Search Engines - A look beyond rankings
Web Performance & Search Engines - A look beyond rankings
 
Microformats HTML to API
Microformats HTML to APIMicroformats HTML to API
Microformats HTML to API
 
#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]
 
Shifting Gears
Shifting GearsShifting Gears
Shifting Gears
 
New Browsers
New BrowsersNew Browsers
New Browsers
 
Mobile web-apps
Mobile web-appsMobile web-apps
Mobile web-apps
 
Looking into HTML5
Looking into HTML5Looking into HTML5
Looking into HTML5
 
Developing PHP Web Applications with the Raxan Framework
Developing PHP Web Applications with the Raxan FrameworkDeveloping PHP Web Applications with the Raxan Framework
Developing PHP Web Applications with the Raxan Framework
 
Intro to html5 Boilerplate
Intro to html5 BoilerplateIntro to html5 Boilerplate
Intro to html5 Boilerplate
 
Findability Bliss Through Web Standards
Findability Bliss Through Web StandardsFindability Bliss Through Web Standards
Findability Bliss Through Web Standards
 
Web Standards: Fueling Innovation [Web Design World Boston '08]
Web Standards: Fueling Innovation [Web Design World Boston '08]Web Standards: Fueling Innovation [Web Design World Boston '08]
Web Standards: Fueling Innovation [Web Design World Boston '08]
 
Everything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick Stox
Everything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick StoxEverything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick Stox
Everything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick Stox
 
REST, the internet as a database?
REST, the internet as a database?REST, the internet as a database?
REST, the internet as a database?
 
Html 5 introduction
Html 5 introductionHtml 5 introduction
Html 5 introduction
 
Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010Web design 2 - Basic HTML 2010
Web design 2 - Basic HTML 2010
 
Front End on Rails
Front End on RailsFront End on Rails
Front End on Rails
 
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick StoxSMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
 
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
 

En vedette

プレゼン
プレゼンプレゼン
プレゼンdolls1023
 
Sse co creating value-5a_2011
Sse co creating value-5a_2011Sse co creating value-5a_2011
Sse co creating value-5a_2011LudvigSSE
 
Sse strategy dice_2011
Sse strategy dice_2011Sse strategy dice_2011
Sse strategy dice_2011LudvigSSE
 
Chemistry at the University of Leicester
Chemistry at the University of LeicesterChemistry at the University of Leicester
Chemistry at the University of LeicesterTeam MyRSC
 
Chemistry applicants - the process
Chemistry applicants - the processChemistry applicants - the process
Chemistry applicants - the processTeam MyRSC
 

En vedette (9)

プレゼン
プレゼンプレゼン
プレゼン
 
Movie maker 002
Movie maker 002Movie maker 002
Movie maker 002
 
Sonar quality
Sonar qualitySonar quality
Sonar quality
 
Presentation1
Presentation1Presentation1
Presentation1
 
Sse co creating value-5a_2011
Sse co creating value-5a_2011Sse co creating value-5a_2011
Sse co creating value-5a_2011
 
Sse strategy dice_2011
Sse strategy dice_2011Sse strategy dice_2011
Sse strategy dice_2011
 
Azure for ug
Azure for ugAzure for ug
Azure for ug
 
Chemistry at the University of Leicester
Chemistry at the University of LeicesterChemistry at the University of Leicester
Chemistry at the University of Leicester
 
Chemistry applicants - the process
Chemistry applicants - the processChemistry applicants - the process
Chemistry applicants - the process
 

Similaire à Html5

Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Alfresco Software
 
HTML5 and web technology update
HTML5 and web technology updateHTML5 and web technology update
HTML5 and web technology updateDoug Domeny
 
HTML5 - What h#@$ is it?
HTML5 - What h#@$ is it?HTML5 - What h#@$ is it?
HTML5 - What h#@$ is it?Carlos Ramon
 
Developing Gadgets
Developing GadgetsDeveloping Gadgets
Developing GadgetsQuirk
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersTodd Anglin
 
JWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAXJWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAXHilary Mason
 
WordPress Standardized Loop API
WordPress Standardized Loop APIWordPress Standardized Loop API
WordPress Standardized Loop APIChris Jean
 
Real-World AJAX with ASP.NET
Real-World AJAX with ASP.NETReal-World AJAX with ASP.NET
Real-World AJAX with ASP.NETgoodfriday
 
GTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementationGTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementationDavid Calavera
 
Getting More Traffic From Search Advanced Seo For Developers Presentation
Getting More Traffic From Search  Advanced Seo For Developers PresentationGetting More Traffic From Search  Advanced Seo For Developers Presentation
Getting More Traffic From Search Advanced Seo For Developers PresentationSeo Indonesia
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010Brendan Sera-Shriar
 
Html 5 a step towards semantic web
Html 5   a step towards semantic webHtml 5   a step towards semantic web
Html 5 a step towards semantic webSachin Khosla
 
Lecture 1 - Comm Lab: Web @ ITP
Lecture 1 - Comm Lab: Web @ ITPLecture 1 - Comm Lab: Web @ ITP
Lecture 1 - Comm Lab: Web @ ITPyucefmerhi
 

Similaire à Html5 (20)

Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
Enterprise Google Gadgets Integrated with Alfresco - Open Source ECM
 
Ajaxppt
AjaxpptAjaxppt
Ajaxppt
 
Ajaxppt
AjaxpptAjaxppt
Ajaxppt
 
HTML5 and web technology update
HTML5 and web technology updateHTML5 and web technology update
HTML5 and web technology update
 
HTML5 - What h#@$ is it?
HTML5 - What h#@$ is it?HTML5 - What h#@$ is it?
HTML5 - What h#@$ is it?
 
Developing Gadgets
Developing GadgetsDeveloping Gadgets
Developing Gadgets
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
 
JWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAXJWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAX
 
Spring Surf 101
Spring Surf 101Spring Surf 101
Spring Surf 101
 
Hack Day EU 2011 YQL
Hack Day EU 2011 YQLHack Day EU 2011 YQL
Hack Day EU 2011 YQL
 
WordPress Standardized Loop API
WordPress Standardized Loop APIWordPress Standardized Loop API
WordPress Standardized Loop API
 
Real-World AJAX with ASP.NET
Real-World AJAX with ASP.NETReal-World AJAX with ASP.NET
Real-World AJAX with ASP.NET
 
Jsp
JspJsp
Jsp
 
GTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementationGTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementation
 
Getting More Traffic From Search Advanced Seo For Developers Presentation
Getting More Traffic From Search  Advanced Seo For Developers PresentationGetting More Traffic From Search  Advanced Seo For Developers Presentation
Getting More Traffic From Search Advanced Seo For Developers Presentation
 
HTML and CSS workshop
HTML and CSS workshopHTML and CSS workshop
HTML and CSS workshop
 
Intro on GWT & Google APIs (Vikram Rangnekar, COO of Socialwok.com)
Intro on GWT & Google APIs (Vikram Rangnekar, COO of Socialwok.com)Intro on GWT & Google APIs (Vikram Rangnekar, COO of Socialwok.com)
Intro on GWT & Google APIs (Vikram Rangnekar, COO of Socialwok.com)
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010
 
Html 5 a step towards semantic web
Html 5   a step towards semantic webHtml 5   a step towards semantic web
Html 5 a step towards semantic web
 
Lecture 1 - Comm Lab: Web @ ITP
Lecture 1 - Comm Lab: Web @ ITPLecture 1 - Comm Lab: Web @ ITP
Lecture 1 - Comm Lab: Web @ ITP
 

Plus de dotNETUserGroupDnipro (9)

Mercurial presentation
Mercurial presentationMercurial presentation
Mercurial presentation
 
Ef code first
Ef code firstEf code first
Ef code first
 
Rx for .net
Rx for .netRx for .net
Rx for .net
 
Winmobile
WinmobileWinmobile
Winmobile
 
Soft serve prism
Soft serve prismSoft serve prism
Soft serve prism
 
Erp microsoft dynamics
Erp microsoft dynamicsErp microsoft dynamics
Erp microsoft dynamics
 
Css 3 overview
Css 3 overviewCss 3 overview
Css 3 overview
 
Mvc3
Mvc3Mvc3
Mvc3
 
Balsamiq
BalsamiqBalsamiq
Balsamiq
 

Html5

  • 2. Rough Timeline of Web Technologies 1991 HTML 1994 HTML 2 1996 CSS1 + JavaScript 1997 HTML 4 1998 CSS 2 2000 XHTML 1 2002 Tableless Web Design 2005 AJAX 2009 HTML 5
  • 3. What is HTML5 ? HTML5 ~=HTML + CSS + JS APIs
  • 4. New simple doctype <!DOCTYPE html>
  • 5. New semantic tags <body> <header> <hgroup> <h1>Page title</h1> <h2>Page subtitle</h2> </hgroup> </header> <nav> <ul> Navigation... </ul> </nav> <section> <article> <header> <h1>Title</h1> </header> <section> Content... </section> </article> <article> <header> <h1>Title</h1> </header> <section> Content... </section> </article> <article> <header> <h1>Title</h1> </header> <section> Content... </section> </article> </section> <aside> Top links... </aside> <footer> Copyright © 2010. </footer> </body>
  • 6. Div vs New tags
  • 7. New link relations <link rel="alternate" type="application/rss+xml" href="http://myblog.com/feed" /> <link rel="icon" href="/favicon.ico" /> <link rel="pingback" href="http://myblog.com/xmlrpc.php"> <link rel="prefetch"href="http://myblog.com/main.php"> ... <a rel="archives" href="http://myblog.com/archives">old posts</a> <a rel="external" href="http://notmysite.com">tutorial</a> <a rel="license" href="http://www.apache.org/licenses/LICENSE-2.0">license</a> <a rel="nofollow" href="http://notmysite.com/sample">wannabe</a> <a rel="tag" href="http://myblog.com/category/games">games posts</a> http://www.blog.whatwg.org/the-road-to-html-5-link-relations#what
  • 8. ARIA attributes <ul id="tree1" role="tree" tabindex="0« aria-labelledby="label_1"> <lirole="treeitem" tabindex="-1" aria-expanded="true">Fruits</li> <lirole="group"> <ul> <lirole="treeitem" tabindex="-1">Oranges</li> <lirole="treeitem" tabindex="-1">Pineapples</li> ... </ul> </li> </ul>
  • 10. Audio + Video <audio id="audio" src="djtapolskii.mp3" controls></audio>; <video id="video" src="10 минут для пресса.avi" autoplay controls></video>
  • 11. Canvas <canvas id="canvas" width="838" height="220"></canvas> <script> varcanvasContext = document.getElementById("canvas").getContext("2d"); canvasContext.fillRect(250, 25, 150, 100); canvasContext.beginPath(); canvasContext.arc(450, 110, 100, Math.PI * 1/2, Math.PI * 3/2); canvasContext.lineWidth = 15; canvasContext.lineCap = 'round'; canvasContext.strokeStyle = 'rgba(255, 127, 0, 0.5)'; canvasContext.stroke(); </script>
  • 12.
  • 14. Web Forms 2.0 (Input Fields)
  • 16.
  • 17. New Selectors Finding elements by class (DOM API) var el = document.getElementById('section1'); el.focus(); varels = document.getElementsByTagName('div'); els[0].focus(); varels = document.getElementsByClassName('section'); els[0].focus(); Finding elements by CSS syntax (Selectors API) varels = document.querySelectorAll("ulli:nth-child(odd)"); varels = document.querySelectorAll("table.test > tr > td");
  • 18. Web Storage // use localStorage for persistent storage // use sessionStorage for per tab storage textarea.addEventListener('keyup', function () { window.localStorage['value'] = area.value; window.localStorage['timestamp'] = (new Date()).getTime(); }, false); textarea.value = window.localStorage['value']; Save text value on the client side
  • 19. Web SQL Database Var db = window.openDatabase(“Database Name”, “Database Version”); db.transaction(function(tx) { tx.executeSql(“SELECT * FROM test”, [], successCallback, errorCallback); }); If you try to open a database that doesn’t exist, the API will create it on the fly for you. You also don’t have to worry about closing databases. http://html5doctor.com/introducing-web-sql-databases/
  • 20. Application Cache <html manifest = “cache.manifest”> Window.applicationCache.addEventListener( ‘checking’ , updateCacheStatus, false); CACHE MANIFEST # version 1 CACHE: /html5/src/refresh.png /html5/src/logic.js /html5/src/style.css /html5/src/background.png
  • 21. Web Workers main.js: var worker = new Worker('extra_work.js'); worker.onmessage = function(event) { alert(event.data); }; extra_work.js: self.onmessage= function(event) { // Do some work. self.postMessage(some_data); }
  • 22. Web Sockets var socket = new WebSocket(location); socket.onopen = function(event) { socket.postMessage(“Hello, WebSocket”); } socket.onmessage = function(event) { alert(event.data); } socket.onclose = function(event) { alert(“closed”); } Bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket, designed to be implemented in webbrowsers and web servers.
  • 23. Notifications if (window.webkitNotifications.checkPermission() == 0) { // you can pass any url as a parameter window.webkitNotifications.createNotification(tweet.picture, tweet.title, tweet.text).show(); } else { window.webkitNotifications.requestPermission(); } http://playground.html5rocks.com/#simple_notifications
  • 24. Drag and drop document.addEventListener('dragstart', function(event) { event.dataTransfer.setData('text', 'Customized text'); event.dataTransfer.effectAllowed= 'copy'; }, false); http://playground.html5rocks.com/#drag_from_desktop
  • 25. Geolocation if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var lat = position.coords.latitude; varlng = position.coords.longitude; var options = { position: new google.maps.LatLng(lat, lng) } var marker = new google.maps.Marker(options); marker.setMap(map); }); }
  • 26.
  • 29.
  • 30. <html>5doctor <!--[if lte IE 8]> <script src="html5.js" type="text/javascript"></script> <![endif]--> <style> time { font-style: italic; }; figure { border: 4px inset #AAA; padding: 4px } hgroup { color: red;} … <time datetime="2009-09-13">my birthday</time> <br> <figure> <imgsrc="myPhoto.jpg“ /> </figure> <br> <hgroup> Hello World! </hgroup> http://remysharp.com/downloads/html5.js
  • 31. Europe Headquarters 52 V. Velykoho Str. Lviv 79053, Ukraine Tel: +380-32-240-9090Fax: +380-32-240-9080 E-mail: info@softserveinc.com Website: www.softserveinc.com US Headquarters 12800 University Drive, Suite 250Fort Myers, FL 33907, USA Tel: 239-690-3111 Fax: 239-690-3116 Thank You! Copyright ©2010 SoftServe, Inc. Contacts