What’s New
- Avoiding Unnecessary Paints
- CSS Masking
- Easy High DPI Images
- Profiling Mobile HTML5 Apps With Chrome DevTools
- Shadow DOM 301: Advanced Concepts & DOM APIs
- Shadow DOM 201
- Touch And Mouse
- Accelerated Rendering in Chrome
- HTML's New Template Tag
- Confound Malicious Middlemen with HTTPS and HTTP Strict Transport Security
- HTML5 context menus in Firefox (Screencast and Code)
A platform that works for you, not against you
Isn't it painful to build web apps? Luckily, smart folks are improving
the underlying (core) platform to make our lives easier. These improvements include
additions to ECMAScript (the JavaScript language), ways to interact with the DOM,
and even old friends like XMLHttpRequest and <input type="file">.
Here are just a few:
- JavaScript Typed Arrays
- New selectors:
querySelector(),querySelectorAll(),matchesSelector() - Custom data-* attributes:
Element.dataset Element.classList- XMLHttpRequest2
- Mutation Observers
- Context menus
- Web Intents
These additions make apps easier to build, offload more work to the browser, and reduce your footprint (e.g. by removing the need for libraries that handle the same functionality).
With smarter APIs, we can build smarter apps
The platform includes APIs that give you greater insight into what is happening in your application. These APIs allow you to make smarter choices in your app, save battery/CPU, and create a better user experience.
- Smarter animations:
window.requestAnimationFrame() - Form factor detection:
window.matchMedia()and CSS media queries. - History API
- Page Visibility API
- online/offline events
- Custom protocol/content handlers
Demos
window.requestAnimationFrame()
Resources
- Using the Page Visibility API Whitepaper on using the Page Visibility API.
-
Web Developer's Guide to Prerendering in Chrome
How to use the
rel='prerender'attribute to prerender content in a background tab. - Online and offline events documentation MDN reference on online/offline events.
- JavaScript Typed Arrays documentation MDN reference on JS typed arrays.
-
requestAnimationFrame()documentation MDN refernce onwindow.requestAnimationFrame() -
HTML5 History API documentation
MDN reference on the
window.historyAPI. -
Web-based protocol handlers
MDN documentation for
navigator.registerProtocolHandler(). -
Web-based content handlers
MDN documentation for
navigator.registerContentHandler(). - Web Intents Allows apps to register an intent to handle common user actions.
-
Using XMLHttpRequest2
MDN reference on using features in
XMLHttpRequest2. - Cross-Origin Resource Sharing specification