//Called when application is started.
function OnStart()
{
app.SetOrientation( "Portrait" );
//Create a layout with objects vertically centered.
lay = app.CreateLayout( "linear", "VCenter,FillXY" );
//Create a web control.
web = app.CreateWebView( 1.0, 1.0, "IgnoreErrors" );
web.SetOnProgress( web_OnProgess );
lay.AddChild( web );
//Add layout to app.
app.AddLayout( lay );
app.ShowProgress("Loading...");
web.LoadUrl( "http://www.websocket.org/echo.html" );
}
//Show page load progress.
function web_OnProgess( progress )
{
app.Debug( "progress = " + progress );
if( progress==100 ) app.HideProgress();
}Unfortunately, on versions of Android prior to Lollipop, the WebView is not updated.
From Lollipop onwards, both chrome and WebView are planned to be kept pretty much in tandem.
That is what happens now on Lollipop and Marshmallow, by updating the Android System Webview app.
DroidScript relies on the WebView for its DOM, JavaScript etc.
I doubt that DS will ever offer websockets on any version of Android that does not currently support it.