Skip to content

Instantly share code, notes, and snippets.

@iperdomo
Created August 9, 2012 14:49
Show Gist options
  • Save iperdomo/3304839 to your computer and use it in GitHub Desktop.
Save iperdomo/3304839 to your computer and use it in GitHub Desktop.
Testing simple Enyo app on Chrome for Android
<!DOCTYPE html>
<html>
<head>
<title>Enyo 2.0 Sampler</title>
<link rel="shortcut icon" href="assets/favicon.ico">
<!-- -->
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link href="enyo-2.0/enyo.css" rel="stylesheet">
<script src="enyo-2.0/enyo.js"></script>
</head>
<body class="enyo-unselectable">
<script>
enyo.kind({
name: 'CustomButton',
kind: 'enyo.Button',
content: 'Click me',
style: 'width: 70px; height: 48px;'
});
enyo.kind({
name: 'App',
count: 0,
components: [
{kind: 'CustomButton', content: 'B1', ontap: 'handleTap'},
{kind: 'CustomButton', content: 'B2', ontap: 'handleTap'},
{kind: 'CustomButton', content: 'B3', ontap: 'handleTap'},
{name: 'logger'}
],
handleTap: function (inSender, inEvent) {
this.log(inEvent.originator.content);
this.count++;
this.$.logger.setContent(inEvent.originator.content + ' - count: ' + this.count);
}
});
new App().write();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment