Más contenido relacionado
La actualidad más candente
La actualidad más candente (20)
Similar a HTML5 & The Web Platform
Similar a HTML5 & The Web Platform (20)
HTML5 & The Web Platform
- 33. <canvas> <audio> <video> <header>
<footer> <section> <article> <nav>
<aside> <hgroup> <figure> <details>
<datalist> <meter> <progress>
<time> <mark> <ruby> etc...
- 45. <input type=text ...>
<input type=password ...>
<input type=checkbox ...>
<input type=radio ...>
...
- 46. <input type=email ...>
<input type=range ...>
<input type=color ...>
<input type=date ...>
<input type=tel ...>
<input type=url ...>
...
- 63. // コンテキストの取得
var elm = document.querySelector(‘#canvas’);
var ctx = elm.getContext(‘2d’);
// 四角形を描画
ctx.fillStyle = ‘rgba(0, 128, 0, 0.7)’;
ctx.fillRect(50, 50, 160, 200);
- 81. YouTube (TestTube)
http://www.youtube.com/html5
- 95. // ワーカーの作成
var worker = new Worker(‘worker.js’);
// メッセージをワーカーに渡す
worker.postMessage(message);
// ワーカーからのメッセージ
worker.onmessage = function (e) {
doSomething(e.data);
}
- 104. if (navigator.onLine) { // 状態を通知
...
}
window.ononline = function () {
sendData();
}
window.onoffline = function () {
saveData();
}
- 108. var ws = new WebSocket(‘ws://example/serv’);
// 通信開始時の処理
ws.onopen = function () {
ws.send(message);
}
// メッセージを受け取ったとき
ws.onmessage = function (e) { ... }