- html5
- html5/VA
- html5/canvas
- html5/drag-and-drop
- html5/form
- html5/geolocation
- html5/offline-web-application
- html5/others-api
- html5/outline
- html5/overview
- html5/richtext-edit
- html5/video&audio
- html5/web-storage
- html5/web-workers
- html5/webSqlDatabase
- html5/websocket
- html5/문제점
- html5practice/roundRect
- html5practice/즐겨찾기목록만들기
1. 커뮤니케이션 API ¶
프로그램간에 비동식으로 메세지 전달 -? 느슨한 결합(loosely coupled)
메세지 : 임의의 자바스크립트객체 , 단순 문자열
통신 수행의 주체 : 윈도우, 백그라운드 태스크, 서버에서 동작하는 프로그램
메세지 : 임의의 자바스크립트객체 , 단순 문자열
통신 수행의 주체 : 윈도우, 백그라운드 태스크, 서버에서 동작하는 프로그램
메세지 이벤트 : 자바스크립트 객체 ( data, origin, lastEventid, source, ports)
메세지 수신 : onmessage이벤트 핸들러, 이벤트 리스너, MessageEvent객체 얻음
2. 크로스 도큐먼트 메세징 ¶
- 메세지의 송수신을 통해 둘 이상의 웹 페이지가 서로 데이터 주고받음
- 도메인이 다른 웹페이지도 데이터 공유가능
수신 : onmessage() 이벤트 핸들러
- postMessage(data, ports, targetOrigin)
- data : 임의의 자바스크립트 객체
- ports : messagePort객체, 생략가능
- targetOrigin : 메세지를 수신하는 도메인(프로토콜+도메인+포트번호)
- data : 임의의 자바스크립트 객체
- 보안을 위해 메세지를 주고받는 상대의 신원 확인 필수