From: Andy Green Date: Wed, 13 Jul 2016 00:45:22 +0000 (+0800) Subject: plugins-dim-webpage-when-connection-lost X-Git-Tag: accepted/tizen/4.0/unified/20171012.191640~382 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2671b7469a15e6853193dac54c125b15ca6f23ef;p=platform%2Fupstream%2Flibwebsockets.git plugins-dim-webpage-when-connection-lost --- diff --git a/README.coding.md b/README.coding.md index 7a85e33..b4fc811 100644 --- a/README.coding.md +++ b/README.coding.md @@ -672,3 +672,25 @@ the protocol struct. This allocation is only deleted / replaced when the connection accesses a URL region with a different protocol (or the default protocols[0] if no CALLBACK area matches it). + +@section dim Dimming webpage when connection lost + +The lws test plugins' html provides useful feedback on the webpage about if it +is still connected to the server, by greying out the page if not. You can +also add this to your own html easily + + - include lws-common.js from your HEAD section + + + + - dim the page during initialization, in a script section on your page + + lws_gray_out(true,{'zindex':'499'}); + + - in your ws onOpen(), remove the dimming + + lws_gray_out(false); + + - in your ws onClose(), reapply the dimming + + lws_gray_out(true,{'zindex':'499'}); diff --git a/plugins/generic-sessions/assets/index.html b/plugins/generic-sessions/assets/index.html index d370f9d..f0703c0 100644 --- a/plugins/generic-sessions/assets/index.html +++ b/plugins/generic-sessions/assets/index.html @@ -1,5 +1,6 @@ +