Alternative is to choose the type of your application to be HTML .This is when you create your app.
In HTML app you can use app object....
<html>
<head>
<meta name="viewport" content="width=device-width">
<script src="ds:/Sys/app.js"></script>
</head>
<script>
//Called after application is started.
function OnStart()
{
app.ShowPopup( "HTML Rocks!" );
}
</script>
<style>
body { background-color: #ffffff; }
.hello
{
font-size: 42;
width: 100%;
margin-top: 2em;
text-align: center;
color: blue;
}
</style>
<body onload="app.Start()">
<div class=hello> Hello World! </div>
</body>
</html>