Index.html

From WebOS101

Jump to: navigation, search

Most webOS applications are built using HTML and JavaScript, and some combination of one of the available webOS frameworks, or a third-party solution.

The appinfo.json file is used to specify the name of the "main" file to startup upon starting a web-based application (that is type "web" in your appinfo.json). Most apps follow the standard WWW naming convention, calling it "index.html".

Example index.html for the Enyo framework

<!doctype html>
<html>
<head>
<title>My Application</title>
<meta name="viewport" content="height=device-height,width=device-width" />
<script src="../../../enyo/1.0/framework/enyo.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
new MyApps.MyApp().renderInto(document.body);
if(!enyo)
window.close();
</script>
</body>
</html>
Personal tools