gecko/browser/base/content/test/social_chat.html

26 lines
871 B
HTML

<html>
<head>
<meta charset="utf-8">
<script>
function pingWorker() {
var port = navigator.mozSocial.getWorker().port;
port.postMessage({topic: "chatbox-message", result: "ok"});
}
window.addEventListener("socialFrameShow", function(e) {
var port = navigator.mozSocial.getWorker().port;
port.postMessage({topic: "chatbox-visibility", result: "shown"});
}, false);
window.addEventListener("socialFrameHide", function(e) {
var port = navigator.mozSocial.getWorker().port;
port.postMessage({topic: "chatbox-visibility", result: "hidden"});
}, false);
window.addEventListener("socialTest-CloseSelf", function(e) {
window.close();
}, false);
</script>
</head>
<body onload="pingWorker();">
<p>This is a test social chat window.</p>
</body>
</html>